/* ============================================================================
   CREATIVE JOLT POWERHOUSE — DESIGN SYSTEM  (cjfw-tokens.css)
   Built by Canvas. The single source of truth for tokens + components across
   every PowerHouse screen mockup. ONE design system, one designer's hand.

   Governs: Constitution LAW 29 (one consistent design system),
            LAW 30 + S-6 (token-driven per-user themes — resolve before paint),
            LAW 31 (no-flash in-place updates),
            LAW 28 + S-14 (accessibility floors: 4.5:1 text, 44px targets,
                           16px base body, 3:1 focus),
            LAW 27 (purposeful, GPU-accelerated motion; honors reduced-motion).

   Naming: per S-1, CJ-authored tokens use --cjfw-* and components use .cjfw-*.

   THEME ARCHITECTURE
   ------------------
   Every color, surface, shadow and accent below resolves through a token.
   A theme is ONE block of root-token overrides selected by [data-cjfw-theme].
   Switching themes = swapping that single root set — no per-page redesign,
   no duplicated components. The theme is read from storage and applied to
   <html> BEFORE first paint (inline boot script in each page <head>), so a
   user never sees a flash of the default theme (LAW 30 + LAW 31).
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. BRAND CONSTANTS  (master brand — fixed regardless of theme)
   Creative Jolt master palette, per Naomi's rebrand master doc:
     Orange #fe5d02 (controlled emphasis, not spectacle) · Amber #fbaa1c
     Deep Plum #55335f (strategic accent) · charcoal/grays · white = infrastructure
   ---------------------------------------------------------------------------- */
:root{
  --cjfw-brand-orange:    #fe5d02;   /* Creative Jolt Orange — the signature */
  --cjfw-brand-orange-dk: #d94d00;
  --cjfw-brand-amber:     #fbaa1c;
  --cjfw-brand-plum:      #55335f;
  --cjfw-brand-charcoal:  #56545f;
  --cjfw-brand-mid:       #706d77;
  --cjfw-brand-neutral:   #d3d6d8;

  /* Outcome semantics — these MEAN something, consistent across every screen */
  --cjfw-pos:  #1f9d63;   /* good / up / booked / on-track */
  /* --cjfw-warn: the DARK-theme value (the 4 light themes override it to #8f5c08).
     #c47f12 → #cc8413: the old value cleared AA on --cjfw-surface but fell to
     4.32 on --cjfw-surface-3 in default/surge and 4.35 in electric, which is
     where the "Affects live data" pill paints. Now ≥4.65:1 on surface-3 in all
     8 dark themes (worst: default/surge 4.65). Raising it only RAISES contrast
     on every dark surface, and warn is text everywhere except two non-text
     indicators (.cjfw-attnchip--warn .sev, .cjfw-riskdot--likely). Any change
     here is measured by tests/test_token_contrast.py — do not eyeball it. */
  --cjfw-warn: #cc8413;   /* attention / needs review */
  /* --cjfw-neg is the FILL, not the text. Read the next comment before using it.
     The note above says warn "is text everywhere except two non-text indicators"
     — which is WHY warn could be repaired by raising its value. neg cannot, and
     the difference is the whole point: neg is ALSO a fill under #fff
     (.cjfw-btn--danger, line ~2914), so its two jobs pull opposite ways.

     Proved, not guessed (G-190). For the default surface #161b26:
        AA as TEXT on surface   → luminance >= 0.2242
        AA carrying #fff as FILL → luminance <= 0.1833
     Empty range. NO colour of any hue satisfies both — this is arithmetic, not
     a palette problem, so there is no clever red that ends it. #c4342d resolves
     the tie by serving the FILL (#fff on it = 5.42:1 ✓) and failing the text
     (3.18:1 default / 3.31:1 jolt ✗). That is why G-189's danger heading came
     out sub-AA, and why "just lighten neg to #ee6a60" is a TRAP: it would fix
     the heading and silently drop the Remove button's white text to 3.06:1. */
  --cjfw-neg:  #c4342d;   /* problem / down / over-budget — FILL ONLY, see above.
                             #fff on it = 5.42:1 ✓. NOT AA as text on surface. */
  /* The text half of the split. One token cannot do both jobs, so there are two.
     Value is not invented: #ee6a60 is what the 6 dark themes ALREADY chose for
     their own neg. AA on every dark surface (worst: surge 5.56:1). The 4
     LIGHT-surface themes MUST override this — #ee6a60 on #ffffff is ~2.6:1 —
     and each declares #b3261e, again their own existing value. Measured for all
     12 themes by tests/test_token_contrast.py; do not eyeball it. */
  --cjfw-neg-text: #ee6a60;  /* problem, AS TEXT on --cjfw-surface */
  --cjfw-info: #2f6fd0;   /* neutral informational */

  /* Type — operator-grade, not SaaS-cute. Inter for UI, tabular numerics. */
  --cjfw-font-sans:'Inter','Helvetica Neue',Arial,system-ui,sans-serif;
  --cjfw-font-mono:'SFMono-Regular',ui-monospace,'JetBrains Mono',Menlo,monospace;

  /* Scale, radii, spacing — shared rhythm across all screens */
  --cjfw-radius-sm: 8px;
  --cjfw-radius:    12px;
  --cjfw-radius-lg: 18px;
  --cjfw-radius-pill: 999px;
  --cjfw-space-1: 4px;  --cjfw-space-2: 8px;  --cjfw-space-3: 12px;
  --cjfw-space-4: 16px; --cjfw-space-5: 24px; --cjfw-space-6: 32px;
  --cjfw-space-7: 48px; --cjfw-space-8: 64px;
  --cjfw-wrap: 1320px;

  /* Motion — GPU props only, honors reduced-motion below (LAW 27) */
  --cjfw-ease: cubic-bezier(.22,.61,.36,1);
  --cjfw-fast: 140ms;
  --cjfw-med:  240ms;

  /* Accessibility floor (S-14) */
  --cjfw-tap: 44px;          /* minimum touch target */
  --cjfw-focus-ring: 0 0 0 3px var(--cjfw-focus);

  /* Hover/overlay wash on the dark nav rail (CJFW_UserMenu / Change 2, M-69).
     Tokenized so it is never a literal rgba in component CSS (LAW 30/31). The rail
     is dark in every theme, so one white wash reads correctly across every theme. */
  --cjfw-hover-wash: rgba(255,255,255,.06);

  /* RAIL-ACCENT PAIR (Canvas, theme expansion 2026-07-11). The rail is dark in
     EVERY theme — but a LIGHT theme's accent must be deepened to hit AA as text
     on white cards, and that deep accent then dies on the dark rail. This pair
     is "the accent as it appears ON THE RAIL": defaults to the theme accent
     (dark themes never override it); light themes override it with a bright
     variant so rail tags + the active bar keep the electric pop. Replaces the
     old one-off `[data-cjfw-theme="tesla"] .cjfw-navlink .tag` hex patch. */
  --cjfw-accent-rail:     var(--cjfw-accent);
  --cjfw-accent-rail-rgb: var(--cjfw-accent-rgb);
}

/* ----------------------------------------------------------------------------
   2. THEME: DEFAULT  ("Charged" — the measured operator default)
   Cool slate dark surface, Creative Jolt orange as the controlled accent.
   This is the baseline; every other theme overrides only what it must.
   ---------------------------------------------------------------------------- */
:root,
[data-cjfw-theme="default"]{
  --cjfw-accent:        var(--cjfw-brand-orange);
  --cjfw-accent-2:      var(--cjfw-brand-amber);
  --cjfw-accent-ink:    #ffffff;            /* text that sits on the accent */
  --cjfw-accent-rgb:    254,93,2;

  --cjfw-bg:            #0d1017;            /* app canvas */
  --cjfw-bg-2:          #11151e;            /* sunken areas */
  --cjfw-surface:       #161b26;            /* cards */
  --cjfw-surface-2:     #1c2230;            /* raised / inputs */
  --cjfw-surface-3:     #232b3b;            /* hover / active rows */
  --cjfw-sidebar:       #0a0d13;            /* nav rail */
  --cjfw-sidebar-ink:   #aeb6c6;

  --cjfw-border:        #283044;
  --cjfw-border-soft:   #1e2533;
  --cjfw-divider:       #222a3a;

  --cjfw-text:          #eef1f6;
  --cjfw-text-2:        #aab2c2;           /* 4.6:1 on surface — meets AA */
  --cjfw-muted:         #919aac;          /* 6.09:1 on surface · 5.01:1 on surface-3 (was #79849a: 4.58 on
                                              surface but 3.77 on surface-3 — sub-AA. G-174b raised muted to
                                              an AA-on-surface-3 footing in 11 themes and skipped THIS one,
                                              the one everybody sees; the gap sat unmeasured until a 9.5px
                                              pill was put on surface-3 and Gauge measured it.) */

  --cjfw-shadow:        0 18px 40px -22px rgba(0,0,0,.66);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(0,0,0,.6);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.32),
                        0 10px 30px -14px rgba(var(--cjfw-accent-rgb),.45);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.55);

  /* Chart palette — drawn as tokens (S-14 chart accessibility) */
  --cjfw-chart-1: #fe5d02;
  --cjfw-chart-2: #36c2a4;
  --cjfw-chart-3: #5b8def;
  --cjfw-chart-4: #fbaa1c;
  --cjfw-chart-5: #a98bd4;

  color-scheme: dark;
}

/* ----------------------------------------------------------------------------
   3. THEME: JOLT  (high-energy Creative Jolt — orange forward, electric)
   Same layout, hotter accent, warmer ink-black with an amber undertone.
   ---------------------------------------------------------------------------- */
[data-cjfw-theme="jolt"]{
  --cjfw-accent:        #ff6a14;
  --cjfw-accent-2:      #ffb12e;
  --cjfw-accent-ink:    #1a0f06;
  --cjfw-accent-rgb:    255,106,20;

  --cjfw-bg:            #120c08;
  --cjfw-bg-2:          #170f09;
  --cjfw-surface:       #1f150d;
  --cjfw-surface-2:     #281a10;
  --cjfw-surface-3:     #33220f;
  --cjfw-sidebar:       #0d0805;
  --cjfw-sidebar-ink:   #d8b99a;

  --cjfw-border:        #3a2613;
  --cjfw-border-soft:   #271a0f;
  --cjfw-divider:       #2c1d10;

  --cjfw-text:          #fdf3ea;
  --cjfw-text-2:        #d4b9a3;
  --cjfw-muted:         #a98c72;

  --cjfw-shadow:        0 18px 44px -20px rgba(40,15,0,.7);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(40,15,0,.6);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.4),
                        0 12px 34px -12px rgba(var(--cjfw-accent-rgb),.55);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.6);

  --cjfw-chart-1: #ff6a14;
  --cjfw-chart-2: #ffb12e;
  --cjfw-chart-3: #ff9554;
  --cjfw-chart-4: #e8c07a;
  --cjfw-chart-5: #c98a4a;

  color-scheme: dark;
}

/* ----------------------------------------------------------------------------
   4. THEME: TESLA  ("Midnight lab" — REBUILT, Canvas theme expansion 2026-07-11)
   Dave's ask: Tesla, updated, in the CJI electric family. The CJI plugin's
   Tesla is NIKOLA Tesla — "electric discharge, midnight lab" (arc-cyan on deep
   navy) — not the car company's red-on-white this block used to be. Rebuilt to
   match the family: near-black navy surfaces, arc-cyan discharge accent with an
   electric-blue partner, dark accent-ink (cyan is the light source — text on it
   goes dark, 12.9:1). The old light look's successor is the new ARC theme below.
   Per-theme semantic retune: root neg/info sit below AA on these surfaces, so
   this block carries luminance-tuned variants (same hue = same meaning).
   ---------------------------------------------------------------------------- */
[data-cjfw-theme="tesla"]{
  --cjfw-accent:        #62e9ff;          /* arc discharge cyan · 12.8:1 on surface */
  --cjfw-accent-2:      #5b8dff;          /* coil-blue partner */
  --cjfw-accent-ink:    #041420;          /* 13.0:1 on accent, 6.0:1 on accent-2 */
  --cjfw-accent-rgb:    98,233,255;

  --cjfw-bg:            #070a13;
  --cjfw-bg-2:          #0a0e1b;
  --cjfw-surface:       #0e1424;
  --cjfw-surface-2:     #141c31;
  --cjfw-surface-3:     #1b2540;
  --cjfw-sidebar:       #04060d;
  --cjfw-sidebar-ink:   #93a5c6;          /* 8.1:1 on sidebar */

  --cjfw-border:        #223052;
  --cjfw-border-soft:   #182342;
  --cjfw-divider:       #1c2848;

  --cjfw-text:          #e9eefb;          /* 15.8:1 on surface */
  --cjfw-text-2:        #a9b7d6;          /* 9.1:1 */
  --cjfw-muted:         #8fa1c2;          /* 7.0:1 on surface · 5.81:1 on surface-3 (G-174b fix, was 4.48 sub-AA) */

  --cjfw-shadow:        0 18px 44px -20px rgba(0,4,18,.72);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(0,4,18,.62);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.34),
                        0 12px 34px -14px rgba(var(--cjfw-accent-rgb),.4);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.55);

  /* Semantic retune (hue held, luminance lifted to AA on these surfaces) */
  --cjfw-neg:  #ee6a60;                   /* 6.0:1 on surface */
  --cjfw-info: #6d9cf0;                   /* 6.7:1 */

  --cjfw-chart-1: #62e9ff;
  --cjfw-chart-2: #5b8dff;
  --cjfw-chart-3: #a78bfa;
  --cjfw-chart-4: #34d399;
  --cjfw-chart-5: #f2a33c;

  color-scheme: dark;
}

/* ============================================================================
   4b. THEME EXPANSION — the electric family (Canvas, 2026-07-11)
   Dave's brief: more options, a mix of light and dark, drawn from the CJI
   plugin's Appearance palette so PowerHouse and the plugin read as ONE brand.
   Names + palettes trace to CJIFW_get_theme_definitions() (Electric, Plasma,
   Surge, Plutonium, Ignite, Edison) plus two coinages in the same voltage
   vocabulary (Arc, Ion) and the brand-light Spark.

   Registration discipline per theme (the S-6 checklist):
     · full surface/border/text/accent set, token-only
     · money-token triplet tuned >=4.5:1 vs card surface (ruling 1, 2026-07-02)
       — lives in section 6.0 below with the others
     · semantic retune where root pos/warn/neg/info miss AA on these surfaces
     · charts >=3:1 vs surface · color-scheme declared
     · LIGHT themes: the rail stays DARK (structural duotone — rail components
       carry #fff/white-wash constants), so each light theme ships a bright
       --cjfw-accent-rail pair for rail tags + the active bar.
   Every pair below verified by Canvas's WCAG harness (theme_contrast.py run
   2026-07-11); numbers in comments are that run's output.
   ============================================================================ */

/* ---- ELECTRIC (dark) — blue energy, cyan current. CJI 'electric'. ---- */
[data-cjfw-theme="electric"]{
  --cjfw-accent:        #00d4ff;          /* 9.7:1 on surface */
  --cjfw-accent-2:      #38a0ff;
  --cjfw-accent-ink:    #001722;          /* 10.4:1 on accent */
  --cjfw-accent-rgb:    0,212,255;

  --cjfw-bg:            #050e1d;
  --cjfw-bg-2:          #081527;
  --cjfw-surface:       #0c1c33;
  --cjfw-surface-2:     #12253f;
  --cjfw-surface-3:     #162b47;
  --cjfw-sidebar:       #030a15;
  --cjfw-sidebar-ink:   #8fb3d9;

  --cjfw-border:        #1e3c60;
  --cjfw-border-soft:   #152c4a;
  --cjfw-divider:       #183050;

  --cjfw-text:          #e6eef7;          /* 14.6:1 */
  --cjfw-text-2:        #a3bcd8;          /* 8.7:1 */
  --cjfw-muted:         #87a4c4;          /* 6.6:1 on surface · 5.53:1 on surface-3 (G-174b fix, was 4.36 sub-AA) */

  --cjfw-shadow:        0 18px 44px -20px rgba(0,6,20,.72);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(0,6,20,.62);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.32),
                        0 12px 34px -14px rgba(var(--cjfw-accent-rgb),.42);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.5);

  --cjfw-neg:  #ee6a60;                   /* 5.6:1 */
  --cjfw-info: #6d9cf0;                   /* 6.2:1 */

  --cjfw-chart-1: #00d4ff;
  --cjfw-chart-2: #38a0ff;
  --cjfw-chart-3: #7ee787;
  --cjfw-chart-4: #f2a33c;
  --cjfw-chart-5: #c792ea;

  color-scheme: dark;
}

/* ---- PLASMA (dark) — hot magenta, ionized energy. CJI 'plasma'. ---- */
[data-cjfw-theme="plasma"]{
  --cjfw-accent:        #f45cb9;          /* 6.2:1 on surface */
  --cjfw-accent-2:      #b07cff;
  --cjfw-accent-ink:    #26041a;          /* 6.4:1 on accent */
  --cjfw-accent-rgb:    244,92,185;

  --cjfw-bg:            #100618;
  --cjfw-bg-2:          #150a1f;
  --cjfw-surface:       #1c0f2a;
  --cjfw-surface-2:     #241538;
  --cjfw-surface-3:     #2e1c48;
  --cjfw-sidebar:       #0a0410;
  --cjfw-sidebar-ink:   #c39ad0;

  --cjfw-border:        #3a2258;
  --cjfw-border-soft:   #2a1840;
  --cjfw-divider:       #301d4a;

  --cjfw-text:          #f6ecfa;          /* 15.9:1 */
  --cjfw-text-2:        #cfaede;          /* 9.4:1 */
  --cjfw-muted:         #a887ba;          /* 5.9:1 on surface · 4.97:1 on surface-3 (G-174b fix, was 4.75 sub-4.9-bar) */

  --cjfw-shadow:        0 18px 44px -20px rgba(16,2,26,.74);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(16,2,26,.64);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.34),
                        0 12px 34px -14px rgba(var(--cjfw-accent-rgb),.44);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.55);

  --cjfw-neg:  #ee6a60;                   /* 6.0:1 */
  --cjfw-info: #6d9cf0;                   /* 6.7:1 */

  --cjfw-chart-1: #f45cb9;
  --cjfw-chart-2: #b07cff;
  --cjfw-chart-3: #ff8ad2;
  --cjfw-chart-4: #6fd3ff;
  --cjfw-chart-5: #f2a33c;

  color-scheme: dark;
}

/* ---- SURGE (dark) — emerald energy, growth. CJI 'surge'. ---- */
[data-cjfw-theme="surge"]{
  --cjfw-accent:        #35d17c;          /* 8.6:1 on surface */
  --cjfw-accent-2:      #a3e05a;
  --cjfw-accent-ink:    #04180c;          /* 9.3:1 on accent */
  --cjfw-accent-rgb:    53,209,124;

  --cjfw-bg:            #05100a;
  --cjfw-bg-2:          #081810;
  --cjfw-surface:       #0c2016;
  --cjfw-surface-2:     #112a1e;
  --cjfw-surface-3:     #143024;
  --cjfw-sidebar:       #030b06;
  --cjfw-sidebar-ink:   #8fc3a5;

  --cjfw-border:        #1d4230;
  --cjfw-border-soft:   #143122;
  --cjfw-divider:       #183827;

  --cjfw-text:          #e9f6ee;          /* 15.3:1 */
  --cjfw-text-2:        #a8cfb8;          /* 9.9:1 */
  --cjfw-muted:         #77a98c;          /* 6.4:1 */

  --cjfw-shadow:        0 18px 44px -20px rgba(0,12,6,.72);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(0,12,6,.62);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.32),
                        0 12px 34px -14px rgba(var(--cjfw-accent-rgb),.42);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.5);

  --cjfw-neg:  #ee6a60;                   /* 5.6:1 */
  --cjfw-info: #6d9cf0;                   /* 6.2:1 */

  --cjfw-chart-1: #35d17c;
  --cjfw-chart-2: #a3e05a;
  --cjfw-chart-3: #4dd0e1;
  --cjfw-chart-4: #f2a33c;
  --cjfw-chart-5: #b39ddb;

  color-scheme: dark;
}

/* ---- PLUTONIUM (dark) — Cherenkov violet, deep glow. CJI 'plutonium'. ---- */
[data-cjfw-theme="plutonium"]{
  --cjfw-accent:        #9d7bff;          /* 5.9:1 on surface */
  --cjfw-accent-2:      #33ccff;          /* the Cherenkov cyan pairing */
  --cjfw-accent-ink:    #100633;          /* 6.1:1 on accent */
  --cjfw-accent-rgb:    157,123,255;

  --cjfw-bg:            #08041a;
  --cjfw-bg-2:          #0d0824;
  --cjfw-surface:       #131030;
  --cjfw-surface-2:     #1a153f;
  --cjfw-surface-3:     #231c52;
  --cjfw-sidebar:       #05020f;
  --cjfw-sidebar-ink:   #a79ad0;

  --cjfw-border:        #2e2560;
  --cjfw-border-soft:   #201847;
  --cjfw-divider:       #251d50;

  --cjfw-text:          #eeeafd;          /* 15.6:1 */
  --cjfw-text-2:        #b7abdd;          /* 8.6:1 */
  --cjfw-muted:         #9d90c4;          /* 6.3:1 on surface · 5.31:1 on surface-3 (G-174b fix, was 4.18 sub-AA) */

  --cjfw-shadow:        0 18px 44px -20px rgba(4,0,22,.74);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(4,0,22,.64);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.36),
                        0 12px 34px -14px rgba(var(--cjfw-accent-rgb),.46);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.55);

  --cjfw-neg:  #ee6a60;                   /* 6.0:1 */
  --cjfw-info: #6d9cf0;                   /* 6.7:1 */

  --cjfw-chart-1: #9d7bff;
  --cjfw-chart-2: #33ccff;
  --cjfw-chart-3: #ff6ec7;
  --cjfw-chart-4: #34d399;
  --cjfw-chart-5: #f2a33c;

  color-scheme: dark;
}

/* ---- IGNITE (dark) — carbon black, crimson fire. CJI 'ignite'.
   NOTE: ignite's coral accent sits near the neg red — the record-match PUSH
   family remap (formerly keyed to the old red tesla) is re-keyed to ignite in
   _record_match_css.html so ↓push and ⚠changed stay unmistakable. ---- */
[data-cjfw-theme="ignite"]{
  --cjfw-accent:        #ff6f5c;          /* 6.6:1 on surface */
  --cjfw-accent-2:      #ffa94d;
  --cjfw-accent-ink:    #290804;          /* 6.8:1 on accent */
  --cjfw-accent-rgb:    255,111,92;

  --cjfw-bg:            #100a09;
  --cjfw-bg-2:          #170f0d;
  --cjfw-surface:       #1e1412;
  --cjfw-surface-2:     #281a17;
  --cjfw-surface-3:     #34211d;
  --cjfw-sidebar:       #0a0605;
  --cjfw-sidebar-ink:   #c9a094;

  --cjfw-border:        #45261f;
  --cjfw-border-soft:   #2f1b16;
  --cjfw-divider:       #37201a;

  --cjfw-text:          #f8ece9;          /* 15.6:1 */
  --cjfw-text-2:        #d3b1a8;          /* 9.1:1 */
  --cjfw-muted:         #b89184;          /* 6.4:1 on surface · 5.37:1 on surface-3 (G-174b fix, was 4.56 sub-4.9-bar) */

  --cjfw-shadow:        0 18px 44px -20px rgba(20,4,0,.74);
  --cjfw-shadow-sm:     0 8px 20px -14px rgba(20,4,0,.64);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.34),
                        0 12px 34px -14px rgba(var(--cjfw-accent-rgb),.44);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.55);

  --cjfw-neg:  #ee6a60;                   /* 5.9:1 — hue-adjacent to accent; see remap note */
  --cjfw-info: #6d9cf0;                   /* 6.6:1 */

  --cjfw-chart-1: #ff6f5c;
  --cjfw-chart-2: #ffa94d;
  --cjfw-chart-3: #ffd166;
  --cjfw-chart-4: #4dd0e1;
  --cjfw-chart-5: #b39ddb;

  color-scheme: dark;
}

/* ---- EDISON (LIGHT) — warm filament on paper. CJI 'edison', inverted:
   the incandescent bulb IS light — warm paper canvas, aged-brass accent
   (deep enough for AA text on white), the bright filament gold saved for
   the dark rail via --cjfw-accent-rail. ---- */
[data-cjfw-theme="edison"]{
  --cjfw-accent:        #8a5c05;          /* 5.7:1 on surface — brass, text-safe */
  --cjfw-accent-2:      #9c6a08;
  --cjfw-accent-ink:    #ffffff;          /* 5.8:1 / 4.7:1 on the gradient ends */
  --cjfw-accent-rgb:    138,92,5;
  --cjfw-accent-rail:      #ffd166;       /* lit filament on the dark rail · 12.6:1 */
  --cjfw-accent-rail-rgb:  255,209,102;

  --cjfw-bg:            #f8f3e9;
  --cjfw-bg-2:          #f1e9da;
  --cjfw-surface:       #fffcf5;
  --cjfw-surface-2:     #f7f0e2;
  --cjfw-surface-3:     #efe4cf;
  --cjfw-sidebar:       #1b1508;          /* warm near-black rail (structural duotone) */
  --cjfw-sidebar-ink:   #c7b28c;

  --cjfw-border:        #e0d5bd;
  --cjfw-border-soft:   #eae1cd;
  --cjfw-divider:       #e6dcc6;

  --cjfw-text:          #292013;          /* 15.6:1 */
  --cjfw-text-2:        #5d5138;          /* 7.6:1 */
  --cjfw-muted:         #6b5d40;          /* 6.3:1 on surface · 5.11:1 on surface-3 (G-174b fix, was 4.08 sub-AA) */

  --cjfw-shadow:        0 18px 40px -24px rgba(46,32,8,.22);
  --cjfw-shadow-sm:     0 8px 20px -16px rgba(46,32,8,.16);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.26),
                        0 12px 30px -16px rgba(var(--cjfw-accent-rgb),.24);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.42);

  /* Full semantic retune for light surfaces (root set is dark-tuned) */
  --cjfw-pos:  #157a47;                   /* 5.1:1 */
  --cjfw-warn: #8f5c08;                   /* 5.2:1 */
  --cjfw-neg:  #b3261e;                   /* 6.3:1 */
  /* Light surface: #ee6a60 would be ~2.6:1 on white. This theme's own neg is
     already AA as BOTH text and fill here, so the split names the same value. */
  --cjfw-neg-text: #b3261e;              /* AA as text on this light surface */
  --cjfw-info: #2456c4;                   /* 6.4:1 */

  --cjfw-chart-1: #8a5c05;
  --cjfw-chart-2: #b45309;
  --cjfw-chart-3: #2456c4;
  --cjfw-chart-4: #15734a;
  --cjfw-chart-5: #7048b6;

  color-scheme: light;
}

/* ---- ARC (LIGHT) — arc-lamp white, cool and crisp. The successor to the old
   light tesla: the first electric lights were arc lamps — brilliant, clinical,
   blue-white. Electric-blue accent, cyan flash on the rail. ---- */
[data-cjfw-theme="arc"]{
  --cjfw-accent:        #1d5bd8;          /* 5.9:1 on white */
  --cjfw-accent-2:      #0e7490;
  --cjfw-accent-ink:    #ffffff;          /* 5.9:1 / 5.4:1 on the gradient ends */
  --cjfw-accent-rgb:    29,91,216;
  --cjfw-accent-rail:      #5fd4ff;       /* cyan flash on the dark rail · 10.8:1 */
  --cjfw-accent-rail-rgb:  95,212,255;

  --cjfw-bg:            #f4f6f9;
  --cjfw-bg-2:          #ebeff4;
  --cjfw-surface:       #ffffff;
  --cjfw-surface-2:     #f4f6f9;
  --cjfw-surface-3:     #ebeff4;
  --cjfw-sidebar:       #0f1420;          /* cool near-black rail */
  --cjfw-sidebar-ink:   #a8b3c7;

  --cjfw-border:        #dbe1e9;
  --cjfw-border-soft:   #e7ebf1;
  --cjfw-divider:       #e3e8ee;

  --cjfw-text:          #131722;          /* 17.9:1 */
  --cjfw-text-2:        #454f63;          /* 8.2:1 */
  --cjfw-muted:         #526080;          /* 6.3:1 on surface · 5.44:1 on surface-3 (G-174b fix, was 4.70 sub-4.9-bar) */

  --cjfw-shadow:        0 18px 40px -24px rgba(15,20,32,.22);
  --cjfw-shadow-sm:     0 8px 20px -16px rgba(15,20,32,.16);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.26),
                        0 12px 30px -16px rgba(var(--cjfw-accent-rgb),.26);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.42);

  --cjfw-pos:  #157a47;
  --cjfw-warn: #8f5c08;
  --cjfw-neg:  #b3261e;
  /* Light surface: #ee6a60 would be ~2.6:1 on white. This theme's own neg is
     already AA as BOTH text and fill here, so the split names the same value. */
  --cjfw-neg-text: #b3261e;              /* AA as text on this light surface */
  --cjfw-info: #2456c4;

  --cjfw-chart-1: #1d5bd8;
  --cjfw-chart-2: #0e7490;
  --cjfw-chart-3: #9333ea;
  --cjfw-chart-4: #b45309;
  --cjfw-chart-5: #15734a;

  color-scheme: light;
}

/* ---- ION (LIGHT) — charged violet on porcelain. A charged particle in the
   voltage vocabulary; the light face of plutonium's Cherenkov glow. ---- */
[data-cjfw-theme="ion"]{
  --cjfw-accent:        #6d28d9;          /* 7.1:1 on white */
  --cjfw-accent-2:      #a21caf;
  --cjfw-accent-ink:    #ffffff;          /* 7.1:1 / 6.3:1 on the gradient ends */
  --cjfw-accent-rgb:    109,40,217;
  --cjfw-accent-rail:      #c4a5ff;       /* violet glow on the dark rail · 9.0:1 */
  --cjfw-accent-rail-rgb:  196,165,255;

  --cjfw-bg:            #f7f5fb;
  --cjfw-bg-2:          #efecf7;
  --cjfw-surface:       #ffffff;
  --cjfw-surface-2:     #f6f4fa;
  --cjfw-surface-3:     #edeaf5;
  --cjfw-sidebar:       #151021;          /* violet near-black rail */
  --cjfw-sidebar-ink:   #b3a8cc;

  --cjfw-border:        #e0dcea;
  --cjfw-border-soft:   #eae7f2;
  --cjfw-divider:       #e6e2ef;

  --cjfw-text:          #171223;          /* 18.3:1 */
  --cjfw-text-2:        #4b4560;          /* 9.1:1 */
  --cjfw-muted:         #665e80;          /* 6.0:1 */

  --cjfw-shadow:        0 18px 40px -24px rgba(21,16,33,.22);
  --cjfw-shadow-sm:     0 8px 20px -16px rgba(21,16,33,.16);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.24),
                        0 12px 30px -16px rgba(var(--cjfw-accent-rgb),.24);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.4);

  --cjfw-pos:  #157a47;
  --cjfw-warn: #8f5c08;
  --cjfw-neg:  #b3261e;
  /* Light surface: #ee6a60 would be ~2.6:1 on white. This theme's own neg is
     already AA as BOTH text and fill here, so the split names the same value. */
  --cjfw-neg-text: #b3261e;              /* AA as text on this light surface */
  --cjfw-info: #2456c4;

  --cjfw-chart-1: #6d28d9;
  --cjfw-chart-2: #a21caf;
  --cjfw-chart-3: #1d5bd8;
  --cjfw-chart-4: #b45309;
  --cjfw-chart-5: #15734a;

  color-scheme: light;
}

/* ---- SPARK (LIGHT) — Creative Jolt on warm paper. The brand-orange light
   theme: burnt CJ orange deepened for AA text on white; the true bright brand
   spark lives on the dark rail. The light counterpart of default/jolt. ---- */
[data-cjfw-theme="spark"]{
  --cjfw-accent:        #c2410c;          /* 5.1:1 on surface — burnt CJ orange */
  --cjfw-accent-2:      #8a4a00;
  --cjfw-accent-ink:    #ffffff;          /* 5.2:1 / 6.9:1 on the gradient ends */
  --cjfw-accent-rgb:    194,65,12;
  --cjfw-accent-rail:      #ff8a3d;       /* the true spark on the dark rail · 8.1:1 */
  --cjfw-accent-rail-rgb:  255,138,61;

  --cjfw-bg:            #faf6f0;
  --cjfw-bg-2:          #f3ece2;
  --cjfw-surface:       #fffdf9;
  --cjfw-surface-2:     #f7f1e8;
  --cjfw-surface-3:     #efe6d8;
  --cjfw-sidebar:       #170f08;          /* warm charcoal rail */
  --cjfw-sidebar-ink:   #c9ad8f;

  --cjfw-border:        #e4dac9;
  --cjfw-border-soft:   #ece4d6;
  --cjfw-divider:       #e8dfcf;

  --cjfw-text:          #241b10;          /* 16.7:1 */
  --cjfw-text-2:        #5a4f3e;          /* 7.9:1 */
  --cjfw-muted:         #6a5c44;          /* 6.4:1 on surface · 5.26:1 on surface-3 (G-174b fix, was 4.26 sub-AA) */

  --cjfw-shadow:        0 18px 40px -24px rgba(40,24,8,.22);
  --cjfw-shadow-sm:     0 8px 20px -16px rgba(40,24,8,.16);
  --cjfw-glow:          0 0 0 1px rgba(var(--cjfw-accent-rgb),.26),
                        0 12px 30px -16px rgba(var(--cjfw-accent-rgb),.26);
  --cjfw-focus:         rgba(var(--cjfw-accent-rgb),.42);

  --cjfw-pos:  #157a47;
  --cjfw-warn: #8f5c08;
  --cjfw-neg:  #b3261e;
  /* Light surface: #ee6a60 would be ~2.6:1 on white. This theme's own neg is
     already AA as BOTH text and fill here, so the split names the same value. */
  --cjfw-neg-text: #b3261e;              /* AA as text on this light surface */
  --cjfw-info: #2456c4;

  --cjfw-chart-1: #c2410c;
  --cjfw-chart-2: #8a4a00;
  --cjfw-chart-3: #2456c4;
  --cjfw-chart-4: #15734a;
  --cjfw-chart-5: #7048b6;

  color-scheme: light;
}

/* ============================================================================
   5. BASE / RESET
   ============================================================================ */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:var(--cjfw-font-sans);
  font-size:16px;                          /* base body floor — S-14 */
  line-height:1.55;
  color:var(--cjfw-text);
  background:var(--cjfw-bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transition:background var(--cjfw-med) var(--cjfw-ease),
             color var(--cjfw-med) var(--cjfw-ease);
}
a{color:inherit;text-decoration:none}
img,svg{display:block;max-width:100%}
button{font-family:inherit;cursor:pointer}
::selection{background:rgba(var(--cjfw-accent-rgb),.28)}

/* Numbers in metrics read as tabular — operator discipline */
.cjfw-num{font-variant-numeric:tabular-nums;letter-spacing:-.01em}

/* ----------------------------------------------------------------------------
   ICON SYSTEM — Font Awesome Pro 7.2.0 (loaded in base.html, self-hosted under
   /static/fontawesome/). FA glyphs are FONT glyphs: they inherit `color` and
   scale with `font-size` like text. The base reset above sets `svg{display:block}`,
   which would break inline FA <i> elements — so we DON'T touch FA's own classes;
   instead use the .cjfw-ico wrapper convention for crisp optical alignment.

   CONVENTION (keep every module consistent):
     • Default weight is `fa-solid` for UI controls; `fa-regular` for lighter
       decorative/empty-state marks; `fa-brands` only for third-party logos.
     • Size icons via .cjfw-ico (1em, aligns to text) or a fixed font-size; do
       NOT hardcode px widths the way the legacy inline SVGs did.
     • Color with `currentColor` — an icon takes its meaning's color (e.g.
       color:var(--cjfw-pos) for a booked outcome, var(--cjfw-neg) for a problem).
     • Mark decorative icons aria-hidden="true"; give meaningful icons a title/label.
   Full guidance + the common-icon table live in README.md ("Icon system"). */
.cjfw-ico{
  display:inline-flex;align-items:center;justify-content:center;
  width:1em;height:1em;line-height:1;flex:0 0 auto;
}
.cjfw-ico>i,.cjfw-ico>.fa,.cjfw-ico>.fas,.cjfw-ico>.far,.cjfw-ico>.fab{
  display:inline-block;line-height:1;  /* override the global svg/img reset path */
}
/* FA glyphs sitting directly inside our chrome inherit ink + optical centering */
.cjfw-navlink i,.cjfw-btn i,.cjfw-topbar i,.cjfw-userchip i{vertical-align:-.06em}

/* Visible keyboard focus everywhere — 3:1 floor (S-14) */
a:focus-visible,button:focus-visible,input:focus-visible,
select:focus-visible,[tabindex]:focus-visible,.cjfw-navlink:focus-visible{
  outline:none;
  box-shadow:var(--cjfw-focus-ring);
  border-radius:var(--cjfw-radius-sm);
}

/* ============================================================================
   6. APP SHELL  — left-vertical desktop nav, collapses to drawer on mobile
      (LAW 26 + S-13). Admin and Client both use this shell; their nav CONTENT
      differs (separate nav systems) but the chrome is one component.
   ============================================================================ */
.cjfw-app{min-height:100vh;display:grid;grid-template-columns:264px 1fr}

/* Mobile drawer backdrop — ALWAYS out of document flow so it never claims a
   grid track. (Bug fix C-75: when this was positioned only inside the mobile
   media query, at desktop widths it became an in-flow grid item, stole the
   264px rail column, and pushed the rail into the 1fr track — the rail then
   rendered full-width and covered the content. It is invisible by default;
   it only becomes interactive when .is-navopen on mobile.) */
.cjfw-scrim{
  position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.5);
  opacity:0;pointer-events:none;transition:opacity var(--cjfw-med);
  display:none;                       /* not even painted at desktop */
}

.cjfw-rail{
  background:var(--cjfw-sidebar);
  border-right:1px solid var(--cjfw-border-soft);
  display:flex;flex-direction:column;
  position:sticky;top:0;height:100vh;
}
.cjfw-rail__brand{
  display:flex;align-items:center;gap:10px;
  padding:20px 20px 18px;
}
.cjfw-logo{display:inline-flex;align-items:center;gap:9px;font-weight:800;letter-spacing:-.02em}
/* Brand mark (Dave ask C, M-66) — the Creative Jolt block: an orange->amber accent
   tile holding the WHITE jolt mark (/static/brand/cj-mark-white.svg, recolored from the
   team's B&W master). The container PAINTS the gradient block + glow; the mark sits
   centered on top in white. A brand mark holds Creative Jolt's own colors on EVERY theme
   (default/jolt/tesla) — the block stays orange->amber and the mark stays white; only the
   UI chrome themes around it. (Was the plum+gradient cj-symbol.svg tile; replaced because
   the purple read wrong against the orange brand block.) */
.cjfw-brandmark{
  width:28px;height:28px;border-radius:8px;flex:0 0 auto;
  display:grid;place-items:center;
  background:linear-gradient(135deg,var(--cjfw-brand-orange),var(--cjfw-brand-amber));
  box-shadow:var(--cjfw-glow);
}
.cjfw-brandmark__mark{width:18px;height:18px;display:block}
.cjfw-logo__txt{font-size:15px;line-height:1.05;color:#fff}
.cjfw-logo__txt b{color:#fff}
.cjfw-logo__txt .sub{display:block;font-size:10.5px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--cjfw-sidebar-ink);margin-top:2px}

.cjfw-rail__scope{
  margin:2px 14px 12px;padding:10px 12px;border-radius:var(--cjfw-radius);
  background:rgba(255,255,255,.03);border:1px solid var(--cjfw-border-soft);
  font-size:12px;color:var(--cjfw-sidebar-ink);
}
.cjfw-rail__scope b{color:#fff;font-weight:600;font-size:12.5px}

.cjfw-navgroup{padding:6px 14px}
.cjfw-navgroup__label{
  font-size:10.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;
  color:var(--cjfw-sidebar-ink);opacity:.7;padding:10px 12px 6px;
}
.cjfw-navlink{
  display:flex;align-items:center;gap:12px;
  padding:0 12px;min-height:var(--cjfw-tap);          /* 44px tap target */
  border-radius:10px;color:var(--cjfw-sidebar-ink);
  font-size:14px;font-weight:500;
  transition:background var(--cjfw-fast) var(--cjfw-ease),
             color var(--cjfw-fast) var(--cjfw-ease);
}
.cjfw-navlink svg{width:18px;height:18px;flex:0 0 auto;opacity:.85}
.cjfw-navlink:hover{background:rgba(255,255,255,.05);color:#fff}
/* Rail accents resolve through the RAIL-ACCENT PAIR (section 1) — identical to
   the plain accent on dark themes; the bright variant on light themes, whose
   deepened text-safe accents would die on the permanently-dark rail. */
.cjfw-navlink.is-active{
  background:linear-gradient(90deg,rgba(var(--cjfw-accent-rail-rgb),.18),rgba(var(--cjfw-accent-rail-rgb),.04));
  color:#fff;position:relative;
}
.cjfw-navlink.is-active::before{
  content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);
  width:3px;height:22px;border-radius:0 3px 3px 0;background:var(--cjfw-accent-rail);
}
.cjfw-navlink .tag{margin-left:auto;font-size:11px;font-weight:700;
  background:rgba(var(--cjfw-accent-rail-rgb),.16);color:var(--cjfw-accent-rail);
  padding:2px 7px;border-radius:var(--cjfw-radius-pill)}

/* W2 — Platform-group rail descriptions (blueprint §1: the rail itself answers
   the modules-vs-integrations boundary — "Capabilities we mount for a client."
   / "External systems we connect and verify."). Tokens only (LAW 30/31); the
   m1 mockup lacked the descriptions, the blueprint text governs. The stacked
   variant keeps the 44px tap floor and the icon column alignment. */
.cjfw-navlink--desc{align-items:flex-start;padding-top:8px;padding-bottom:8px}
.cjfw-navlink--desc > i{margin-top:3px}
.cjfw-navlink__txt{display:flex;flex-direction:column;gap:1px;min-width:0;line-height:1.3}
.cjfw-navlink__sub{font-size:10.5px;font-weight:500;color:var(--cjfw-sidebar-ink);
  opacity:.72;white-space:normal}
.cjfw-navlink--desc.is-active .cjfw-navlink__sub,
.cjfw-navlink--desc:hover .cjfw-navlink__sub{opacity:.85}

.cjfw-rail__foot{margin-top:auto;padding:14px;border-top:1px solid var(--cjfw-border-soft)}
.cjfw-userchip{display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px;transition:background var(--cjfw-fast)}
.cjfw-userchip:hover{background:rgba(255,255,255,.05)}
.cjfw-avatar{width:34px;height:34px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;font-weight:700;font-size:13px;color:#fff;background:linear-gradient(135deg,var(--cjfw-brand-plum),var(--cjfw-accent))}
.cjfw-userchip__meta{line-height:1.25;min-width:0}
.cjfw-userchip__meta b{font-size:13px;color:#fff;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-userchip__meta span{font-size:11.5px;color:var(--cjfw-sidebar-ink)}

/* ---- User menu (CJFW_UserMenu / Change 2, M-69) — the fleet's first popover.
   Native <details>/<summary>: the .cjfw-userchip IS the <summary> trigger; the
   popover body is absolutely positioned and slides UP out of flow. GPU props only
   (transform/opacity — LAW 28); all colors token-driven (LAW 30/31), washes route
   through --cjfw-hover-wash (never a literal rgba). Reduced-motion is honored by the
   global @media block (LAW 27). No-JS floor: <details> toggles + <form> submits with
   scripting off; cjfw-shell.js only layers ARIA/keyboard on top. ---- */
.cjfw-usermenu{position:relative}
.cjfw-usermenu>summary{
  list-style:none;cursor:pointer;width:100%;
  /* the trigger reuses .cjfw-userchip visuals; only add disclosure affordances */
  outline:none;
}
.cjfw-usermenu>summary::-webkit-details-marker{display:none}     /* drop native triangle */
.cjfw-usermenu>summary::marker{content:""}
.cjfw-usermenu>summary:hover{background:var(--cjfw-hover-wash)}
.cjfw-usermenu>summary:focus-visible{box-shadow:var(--cjfw-focus-ring)}
.cjfw-usermenu__caret{
  margin-left:auto;flex:0 0 auto;font-size:11px;color:var(--cjfw-sidebar-ink);
  transition:transform var(--cjfw-fast) var(--cjfw-ease);
}
.cjfw-usermenu[open]>summary .cjfw-usermenu__caret{transform:rotate(180deg)}

/* Popover body — out of flow, anchored to the foot, slides up from beneath the chip */
.cjfw-usermenu__pop{
  position:absolute;bottom:100%;left:0;right:0;margin-bottom:8px;z-index:50;
  background:var(--cjfw-surface-2);
  border:1px solid var(--cjfw-border);
  border-radius:var(--cjfw-radius);
  box-shadow:var(--cjfw-shadow);
  padding:6px;
  /* closed resting state — translated down + transparent, GPU-only (LAW 28) */
  opacity:0;transform:translateY(6px);pointer-events:none;
  transition:opacity var(--cjfw-fast) var(--cjfw-ease),
             transform var(--cjfw-fast) var(--cjfw-ease);
}
.cjfw-usermenu[open] .cjfw-usermenu__pop{
  opacity:1;transform:translateY(0);pointer-events:auto;
}
.cjfw-usermenu__pop form{margin:0}

/* Menu rows — 44px tap floor (S-14), full-width, token colors only */
.cjfw-usermenu__item{
  display:flex;align-items:center;gap:11px;width:100%;
  min-height:var(--cjfw-tap);padding:0 12px;box-sizing:border-box;
  border-radius:var(--cjfw-radius-sm);
  font-size:13px;font-weight:600;color:var(--cjfw-text);
  text-decoration:none;cursor:pointer;
  /* normalize the <button> variant to match the <a> */
  background:transparent;border:0;font-family:inherit;text-align:left;
  transition:background var(--cjfw-fast) var(--cjfw-ease),
             color var(--cjfw-fast) var(--cjfw-ease);
}
.cjfw-usermenu__item i{width:16px;text-align:center;color:var(--cjfw-sidebar-ink)}
.cjfw-usermenu__item:hover{background:var(--cjfw-hover-wash)}
.cjfw-usermenu__item:focus-visible{outline:none;box-shadow:var(--cjfw-focus-ring)}
.cjfw-usermenu__item--signout{color:var(--cjfw-neg)}
.cjfw-usermenu__item--signout i{color:var(--cjfw-neg)}
.cjfw-usermenu__item--signout:hover{background:color-mix(in srgb,var(--cjfw-neg) 12%,transparent)}
.cjfw-usermenu__divider{height:1px;margin:5px 6px;background:var(--cjfw-divider)}

/* ---- Main column ---- */
.cjfw-main{min-width:0;display:flex;flex-direction:column}
.cjfw-topbar{
  position:sticky;top:0;z-index:20;
  display:flex;align-items:center;gap:16px;
  padding:14px 28px;background:color-mix(in srgb,var(--cjfw-bg) 86%,transparent);
  backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid var(--cjfw-border-soft);
}
.cjfw-burger{display:none;width:44px;height:44px;border-radius:10px;border:1px solid var(--cjfw-border);
  background:var(--cjfw-surface);color:var(--cjfw-text);align-items:center;justify-content:center}
.cjfw-topbar__title{display:flex;flex-direction:column;line-height:1.15}
.cjfw-topbar__title b{font-size:17px;letter-spacing:-.01em}
.cjfw-topbar__title span{font-size:12.5px;color:var(--cjfw-muted)}
.cjfw-topbar__spacer{flex:1}
.cjfw-search{
  display:flex;align-items:center;gap:9px;min-width:240px;max-width:340px;flex:1;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  border-radius:var(--cjfw-radius-pill);padding:0 14px;height:42px;color:var(--cjfw-muted);
}
.cjfw-search input{flex:1;background:none;border:none;color:var(--cjfw-text);font-size:13.5px;outline:none}
.cjfw-search input::placeholder{color:var(--cjfw-muted)}
.cjfw-search kbd{font-family:var(--cjfw-font-mono);font-size:11px;color:var(--cjfw-muted);
  border:1px solid var(--cjfw-border);border-radius:5px;padding:1px 5px}

.cjfw-content{padding:28px;max-width:var(--cjfw-wrap);width:100%;margin:0 auto}

/* ============================================================================
   7. PRIMITIVES — buttons, cards, badges, chips, tables, bars
   ============================================================================ */
.cjfw-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:var(--cjfw-tap);padding:0 18px;border:1px solid transparent;
  border-radius:10px;font-size:14px;font-weight:600;color:var(--cjfw-text);
  background:var(--cjfw-surface-2);border-color:var(--cjfw-border);
  transition:transform var(--cjfw-fast) var(--cjfw-ease),
             background var(--cjfw-fast) var(--cjfw-ease),
             box-shadow var(--cjfw-fast) var(--cjfw-ease);
}
.cjfw-btn svg{width:16px;height:16px}
.cjfw-btn:hover{background:var(--cjfw-surface-3);transform:translateY(-1px)}
.cjfw-btn:active{transform:translateY(0)}
.cjfw-btn--primary{
  background:linear-gradient(135deg,var(--cjfw-accent),var(--cjfw-accent-2));
  color:var(--cjfw-accent-ink);border-color:transparent;box-shadow:var(--cjfw-shadow-sm);
}
.cjfw-btn--primary:hover{box-shadow:var(--cjfw-glow)}
.cjfw-btn--ghost{background:transparent;border-color:var(--cjfw-border)}
.cjfw-btn--sm{min-height:34px;padding:0 12px;font-size:13px}
.cjfw-btn--icon{min-height:42px;width:42px;padding:0}

.cjfw-card{
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border-soft);
  border-radius:var(--cjfw-radius-lg);box-shadow:var(--cjfw-shadow-sm);
  position:relative;
}
.cjfw-card__pad{padding:var(--cjfw-space-5)}
.cjfw-card__head{display:flex;align-items:center;gap:12px;
  padding:18px var(--cjfw-space-5);border-bottom:1px solid var(--cjfw-divider)}
.cjfw-card__head h3{font-size:14.5px;font-weight:700;letter-spacing:-.01em}
.cjfw-card__head .sub{font-size:12.5px;color:var(--cjfw-muted)}
.cjfw-card__head .spacer{flex:1}

/* THE SELECTED TOUCH (Dave 2026-07-31, AC7): a deep link lands on
   #touch-<ref> and the addressed card reads as SELECTED, not merely
   scrolled-to. Pure CSS :target — nothing re-renders, no JS, no flash (the
   no-flash law is satisfied by construction). The second selector covers the
   person journey's shape, where the anchor id sits on the touch block's
   wrapper <section> and the card is its child. Tokens only. */
.cjfw-card:target,
:target > .cjfw-card{
  border-color:rgba(var(--cjfw-accent-rgb),.55);
  box-shadow:var(--cjfw-glow);
}
.cjfw-card:target,
[id^="touch-"]:target{scroll-margin-top:24px}

.cjfw-eyebrow{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--cjfw-muted)}

/* Badges / status — encode by shape + label, not color alone (S-14) */
.cjfw-badge{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;
  padding:3px 10px;border-radius:var(--cjfw-radius-pill);border:1px solid transparent;line-height:1.4}
.cjfw-badge .dot{width:7px;height:7px;border-radius:50%;background:currentColor}
.cjfw-badge--pos{color:var(--cjfw-pos);background:color-mix(in srgb,var(--cjfw-pos) 14%,transparent);border-color:color-mix(in srgb,var(--cjfw-pos) 32%,transparent)}
.cjfw-badge--warn{color:var(--cjfw-warn);background:color-mix(in srgb,var(--cjfw-warn) 15%,transparent);border-color:color-mix(in srgb,var(--cjfw-warn) 34%,transparent)}
.cjfw-badge--neg{color:var(--cjfw-neg);background:color-mix(in srgb,var(--cjfw-neg) 14%,transparent);border-color:color-mix(in srgb,var(--cjfw-neg) 32%,transparent)}
.cjfw-badge--info{color:var(--cjfw-info);background:color-mix(in srgb,var(--cjfw-info) 14%,transparent);border-color:color-mix(in srgb,var(--cjfw-info) 32%,transparent)}
.cjfw-badge--muted{color:var(--cjfw-muted);background:color-mix(in srgb,var(--cjfw-muted) 14%,transparent);border-color:var(--cjfw-border)}

/* Delta indicator — arrow glyph carries direction, not just color */
.cjfw-delta{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums}
.cjfw-delta--up{color:var(--cjfw-pos)}
.cjfw-delta--down{color:var(--cjfw-neg)}
.cjfw-delta--flat{color:var(--cjfw-muted)}

/* Metric / KPI tile */
.cjfw-kpi__label{font-size:12.5px;color:var(--cjfw-muted);font-weight:600;display:flex;align-items:center;gap:7px}
.cjfw-kpi__value{font-size:32px;font-weight:800;letter-spacing:-.02em;margin:8px 0 6px;font-variant-numeric:tabular-nums}
.cjfw-kpi__foot{font-size:12.5px;color:var(--cjfw-muted);display:flex;align-items:center;gap:8px}

/* Progress / mini bar */
.cjfw-bar{height:8px;border-radius:var(--cjfw-radius-pill);background:var(--cjfw-surface-3);overflow:hidden}
.cjfw-bar__fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--cjfw-accent),var(--cjfw-accent-2))}

/* Table */
.cjfw-table{width:100%;border-collapse:collapse;font-size:13.5px}
.cjfw-table th{
  text-align:left;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--cjfw-muted);padding:10px 14px;border-bottom:1px solid var(--cjfw-divider);white-space:nowrap}
.cjfw-table td{padding:13px 14px;border-bottom:1px solid var(--cjfw-border-soft);vertical-align:middle}
.cjfw-table tbody tr{transition:background var(--cjfw-fast)}
.cjfw-table tbody tr:hover{background:var(--cjfw-surface-2)}
.cjfw-table tbody tr:last-child td{border-bottom:none}
.cjfw-cellmain{display:flex;align-items:center;gap:11px}
.cjfw-clientdot{width:30px;height:30px;border-radius:9px;flex:0 0 auto;display:grid;place-items:center;
  font-size:12px;font-weight:800;color:#fff}

/* Segmented control (used by theme picker + filters) */
.cjfw-seg{display:inline-flex;background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  border-radius:var(--cjfw-radius-pill);padding:4px;gap:4px}
.cjfw-seg button{
  min-height:36px;padding:0 16px;border:none;background:none;border-radius:var(--cjfw-radius-pill);
  color:var(--cjfw-text-2);font-size:13px;font-weight:600;display:inline-flex;align-items:center;gap:8px;
  transition:background var(--cjfw-fast) var(--cjfw-ease),color var(--cjfw-fast) var(--cjfw-ease)}
.cjfw-seg button:hover{color:var(--cjfw-text)}
.cjfw-seg button.is-active{background:var(--cjfw-accent);color:var(--cjfw-accent-ink);box-shadow:var(--cjfw-shadow-sm)}

/* Donut/ring (inline SVG components use these) */
.cjfw-ring__track{stroke:var(--cjfw-surface-3)}
.cjfw-ring__val{stroke:var(--cjfw-accent);stroke-linecap:round;transition:stroke-dashoffset var(--cjfw-med) var(--cjfw-ease)}

/* ============================================================================
   8. RESPONSIVE  (LAW 25 — reflow, not stretch; LAW 26 — drawer on mobile)
   ============================================================================ */
@media (max-width:1080px){
  .cjfw-content{padding:22px}
}
@media (max-width:860px){
  .cjfw-app{grid-template-columns:1fr}
  .cjfw-rail{
    position:fixed;left:0;top:0;z-index:60;width:280px;transform:translateX(-100%);
    transition:transform var(--cjfw-med) var(--cjfw-ease);box-shadow:var(--cjfw-shadow);
  }
  .cjfw-app.is-navopen .cjfw-rail{transform:translateX(0)}
  .cjfw-scrim{display:block}                /* paintable on mobile; base rule holds the rest */
  .cjfw-app.is-navopen .cjfw-scrim{opacity:1;pointer-events:auto}
  .cjfw-burger{display:inline-flex}
  .cjfw-search{display:none}
  .cjfw-content{padding:18px}
}

/* Reduced motion — kill non-essential animation (LAW 27 / S-14) */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    transition-duration:.01ms !important;animation-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}

/* Grids used across screens */
.cjfw-grid{display:grid;gap:var(--cjfw-space-5)}
.cjfw-grid--kpi{grid-template-columns:repeat(4,1fr)}
.cjfw-grid--2{grid-template-columns:1.6fr 1fr}
.cjfw-grid--3{grid-template-columns:repeat(3,1fr)}
@media (max-width:1080px){
  .cjfw-grid--kpi{grid-template-columns:repeat(2,1fr)}
  .cjfw-grid--2,.cjfw-grid--3{grid-template-columns:1fr}
}
@media (max-width:560px){
  .cjfw-grid--kpi{grid-template-columns:1fr}
}

/* ============================================================================
   9. IDENTITY-FOUNDATION COMPONENTS  (Canvas — plan §4 / §4.1)
   The create flows, the user surfaces, the S-20 access panel, the view-as bar.
   Every color resolves through the section-1 tokens — NO new palette is
   introduced here (LAW 29: one design system). Forms carry the four states
   (LAW 32) and swap in place (LAW 31).
   ============================================================================ */

/* ---- Section header (page intro above a form/surface) ---- */
.cjfw-pagehead{margin-bottom:24px;max-width:760px}
.cjfw-pagehead h1{font-size:clamp(21px,2.4vw,27px);font-weight:800;letter-spacing:-.025em}
.cjfw-pagehead p{margin-top:7px;color:var(--cjfw-text-2);font-size:14.5px;line-height:1.55}

/* ---- Two-card chooser (Staff vs Client) — the deliberate first decision ---- */
.cjfw-chooser{display:grid;grid-template-columns:1fr 1fr;gap:22px;max-width:820px}
@media(max-width:720px){.cjfw-chooser{grid-template-columns:1fr}}
.cjfw-choice{
  display:flex;flex-direction:column;gap:14px;padding:28px;text-align:left;width:100%;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius-lg);
  box-shadow:var(--cjfw-shadow-sm);position:relative;cursor:pointer;
  transition:transform var(--cjfw-fast) var(--cjfw-ease),border-color var(--cjfw-fast),box-shadow var(--cjfw-fast);
}
.cjfw-choice:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--cjfw-accent) 50%,var(--cjfw-border));box-shadow:var(--cjfw-glow)}
.cjfw-choice:focus-visible{outline:none;box-shadow:var(--cjfw-focus-ring)}
.cjfw-choice__ic{
  width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-size:22px;
  background:color-mix(in srgb,var(--cjfw-accent) 14%,transparent);color:var(--cjfw-accent);
}
.cjfw-choice--client .cjfw-choice__ic{background:color-mix(in srgb,var(--cjfw-info) 15%,transparent);color:var(--cjfw-info)}
.cjfw-choice h3{font-size:18px;font-weight:800;letter-spacing:-.02em}
.cjfw-choice p{font-size:13.5px;color:var(--cjfw-text-2);line-height:1.55}
.cjfw-choice__go{margin-top:auto;display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;color:var(--cjfw-accent)}
.cjfw-choice[aria-disabled="true"]{opacity:.5;cursor:not-allowed;pointer-events:none}
.cjfw-choice__warn{font-size:12px;color:var(--cjfw-muted);display:flex;align-items:center;gap:7px;line-height:1.45}

/* ---- Form scaffolding shared by staff-create / client-wizard / client-side ---- */
.cjfw-formcard{max-width:680px}
.cjfw-fieldset{padding:var(--cjfw-space-5);display:flex;flex-direction:column;gap:18px}
.cjfw-field label,.cjfw-field>.lbl{display:block;font-size:13px;font-weight:600;color:var(--cjfw-text-2);margin-bottom:7px}
.cjfw-field .hint{font-size:12px;color:var(--cjfw-muted);margin-top:6px;line-height:1.45}
.cjfw-input,.cjfw-select{
  width:100%;height:46px;padding:0 14px;font-size:14.5px;color:var(--cjfw-text);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius);
  transition:border-color var(--cjfw-fast),box-shadow var(--cjfw-fast);font-family:inherit;
}
.cjfw-input::placeholder{color:var(--cjfw-muted)}
.cjfw-input:focus,.cjfw-select:focus{outline:none;border-color:var(--cjfw-accent);box-shadow:var(--cjfw-focus-ring)}
.cjfw-input--mono{font-family:var(--cjfw-font-mono);letter-spacing:-.01em}
.cjfw-field2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:560px){.cjfw-field2{grid-template-columns:1fr}}
.cjfw-formfoot{display:flex;align-items:center;gap:12px;padding:18px var(--cjfw-space-5);
  border-top:1px solid var(--cjfw-divider)}
.cjfw-formfoot .spacer{flex:1}

/* slug live-check inline status */
.cjfw-slugrow{display:flex;align-items:center;gap:10px}
.cjfw-slugrow .cjfw-input{flex:1}
.cjfw-slugstat{font-size:12.5px;font-weight:700;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;min-width:96px}
.cjfw-slugstat--ok{color:var(--cjfw-pos)}
.cjfw-slugstat--taken{color:var(--cjfw-neg)}
.cjfw-slugstat--idle{color:var(--cjfw-muted)}

/* ---- Role radio-rows-with-descriptions (plan §4) ---- */
.cjfw-roles{display:flex;flex-direction:column;gap:10px}
.cjfw-role{
  display:flex;gap:14px;align-items:flex-start;padding:14px 16px;cursor:pointer;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius);
  transition:border-color var(--cjfw-fast),background var(--cjfw-fast);
}
.cjfw-role:hover{border-color:color-mix(in srgb,var(--cjfw-accent) 45%,var(--cjfw-border))}
.cjfw-role input{margin-top:3px;width:18px;height:18px;accent-color:var(--cjfw-accent);flex:0 0 auto}
.cjfw-role__body{min-width:0;flex:1}
.cjfw-role__name{font-size:14px;font-weight:700;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.cjfw-role__desc{font-size:12.5px;color:var(--cjfw-muted);margin-top:3px;line-height:1.5}
.cjfw-role:has(input:checked){border-color:var(--cjfw-accent);background:color-mix(in srgb,var(--cjfw-accent) 7%,var(--cjfw-surface-2));box-shadow:0 0 0 1px var(--cjfw-accent) inset}
.cjfw-role.is-disabled{opacity:.55;cursor:not-allowed}
.cjfw-role.is-disabled:hover{border-color:var(--cjfw-border)}
.cjfw-role.is-disabled input{cursor:not-allowed}
/* elevated-tier chip (Super Admin) + disabled note (Master Admin) */
.cjfw-chip-elev{font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  color:var(--cjfw-accent-2);background:color-mix(in srgb,var(--cjfw-accent-2) 16%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-accent-2) 36%,transparent);padding:2px 8px;border-radius:var(--cjfw-radius-pill)}
.cjfw-chip-locked{font-size:10.5px;font-weight:700;letter-spacing:.04em;color:var(--cjfw-muted);
  background:color-mix(in srgb,var(--cjfw-muted) 14%,transparent);border:1px solid var(--cjfw-border);
  padding:2px 8px;border-radius:var(--cjfw-radius-pill);display:inline-flex;align-items:center;gap:5px}

/* ---- Wizard stepper (client create, 2 steps, in-place no-flash swap) ---- */
.cjfw-steps{display:flex;align-items:center;gap:10px;padding:18px var(--cjfw-space-5) 4px}
.cjfw-step{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600;color:var(--cjfw-muted)}
.cjfw-step__num{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12.5px;font-weight:800;
  background:var(--cjfw-surface-3);color:var(--cjfw-muted);border:1px solid var(--cjfw-border);flex:0 0 auto}
.cjfw-step.is-active{color:var(--cjfw-text)}
.cjfw-step.is-active .cjfw-step__num{background:var(--cjfw-accent);color:var(--cjfw-accent-ink);border-color:transparent}
.cjfw-step.is-done .cjfw-step__num{background:color-mix(in srgb,var(--cjfw-pos) 18%,transparent);color:var(--cjfw-pos);border-color:color-mix(in srgb,var(--cjfw-pos) 40%,transparent)}
.cjfw-step__line{flex:1;height:1px;background:var(--cjfw-divider);min-width:18px}
.cjfw-wizpane{display:none}
.cjfw-wizpane.is-active{display:block;animation:cjfwFade var(--cjfw-med) var(--cjfw-ease)}
@keyframes cjfwFade{from{opacity:.55}to{opacity:1}}

/* ---- Invite-first result panel (success after create) ---- */
.cjfw-result{max-width:560px;text-align:center;padding:36px var(--cjfw-space-6)}
.cjfw-result__ic{width:60px;height:60px;border-radius:17px;margin:0 auto 18px;display:grid;place-items:center;font-size:26px;
  background:color-mix(in srgb,var(--cjfw-pos) 15%,transparent);color:var(--cjfw-pos)}
.cjfw-result h2{font-size:21px;font-weight:800;letter-spacing:-.02em;margin-bottom:8px}
.cjfw-result p{color:var(--cjfw-text-2);font-size:14px;line-height:1.6;margin-bottom:6px}
.cjfw-result__who{display:inline-flex;align-items:center;gap:9px;margin:14px 0 4px;padding:9px 15px;border-radius:var(--cjfw-radius-pill);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);font-size:13.5px;font-weight:600}
.cjfw-result__invite{margin-top:18px;display:flex;align-items:flex-start;gap:10px;text-align:left;padding:13px 15px;border-radius:var(--cjfw-radius);
  background:color-mix(in srgb,var(--cjfw-info) 9%,transparent);border:1px solid color-mix(in srgb,var(--cjfw-info) 28%,transparent);
  color:var(--cjfw-text-2);font-size:12.5px;line-height:1.5}
.cjfw-result__invite i{color:var(--cjfw-info);margin-top:1px}
.cjfw-result__actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:26px}

/* ---- Form-level ERROR banner (LAW 32) ---- */
.cjfw-formerr{display:flex;align-items:flex-start;gap:10px;margin:0 var(--cjfw-space-5) 0;padding:12px 14px;
  border-radius:var(--cjfw-radius);font-size:13.5px;line-height:1.5;
  color:var(--cjfw-neg);background:color-mix(in srgb,var(--cjfw-neg) 11%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-neg) 30%,transparent)}
.cjfw-formerr i{margin-top:2px}

/* ---- Users table extras (status pill + role pill + avatar) ---- */
.cjfw-tabbar{display:inline-flex;gap:4px;background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  border-radius:var(--cjfw-radius-pill);padding:4px}
.cjfw-tabbar a{min-height:36px;padding:0 16px;border-radius:var(--cjfw-radius-pill);display:inline-flex;align-items:center;gap:8px;
  font-size:13px;font-weight:600;color:var(--cjfw-text-2);transition:background var(--cjfw-fast),color var(--cjfw-fast)}
.cjfw-tabbar a:hover{color:var(--cjfw-text)}
.cjfw-tabbar a.is-active{background:var(--cjfw-accent);color:var(--cjfw-accent-ink)}
.cjfw-tabbar a .ct{font-variant-numeric:tabular-nums;opacity:.85}
.cjfw-status{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:var(--cjfw-radius-pill);line-height:1.4;border:1px solid transparent}
.cjfw-status .dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.cjfw-status--active{color:var(--cjfw-pos);background:color-mix(in srgb,var(--cjfw-pos) 13%,transparent);border-color:color-mix(in srgb,var(--cjfw-pos) 30%,transparent)}
.cjfw-status--invited{color:var(--cjfw-warn);background:color-mix(in srgb,var(--cjfw-warn) 14%,transparent);border-color:color-mix(in srgb,var(--cjfw-warn) 32%,transparent)}
.cjfw-rolepill{font-size:11.5px;font-weight:700;color:var(--cjfw-text-2);background:var(--cjfw-surface-3);border:1px solid var(--cjfw-border-soft);padding:3px 10px;border-radius:var(--cjfw-radius-pill)}
.cjfw-uav{width:34px;height:34px;border-radius:10px;flex:0 0 auto;display:grid;place-items:center;font-weight:800;font-size:12.5px;color:#fff;background:linear-gradient(135deg,var(--cjfw-brand-plum),var(--cjfw-accent))}

/* empty state (shared) */
.cjfw-empty{text-align:center;color:var(--cjfw-muted);display:flex;flex-direction:column;align-items:center;gap:12px;padding:44px 20px}
.cjfw-empty__ic{font-size:30px;opacity:.55}
.cjfw-empty b{color:var(--cjfw-text);font-size:14.5px;font-weight:700}
.cjfw-empty span{font-size:13px;max-width:340px;line-height:1.5}

/* ---- S-20 "Client access" panel (staged, diff-confirmed grant builder) ---- */
.cjfw-access__mode{display:flex;flex-direction:column;gap:10px;padding:var(--cjfw-space-5)}
.cjfw-access__opt{display:flex;gap:13px;align-items:flex-start;padding:13px 15px;cursor:pointer;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius)}
.cjfw-access__opt input{margin-top:2px;width:18px;height:18px;accent-color:var(--cjfw-accent);flex:0 0 auto}
.cjfw-access__opt:has(input:checked){border-color:var(--cjfw-accent);background:color-mix(in srgb,var(--cjfw-accent) 7%,var(--cjfw-surface-2))}
.cjfw-access__opt b{font-size:13.5px;font-weight:700;display:block}
.cjfw-access__opt span{font-size:12.5px;color:var(--cjfw-muted);line-height:1.5}
.cjfw-grantbuild{display:none;border-top:1px solid var(--cjfw-divider)}
.cjfw-grantbuild.is-open{display:block;animation:cjfwFade var(--cjfw-med) var(--cjfw-ease)}
.cjfw-twopane{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:var(--cjfw-space-5)}
@media(max-width:680px){.cjfw-twopane{grid-template-columns:1fr}}
.cjfw-pane{border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius);overflow:hidden;display:flex;flex-direction:column;max-height:340px}
.cjfw-pane__h{padding:11px 14px;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--cjfw-muted);
  background:var(--cjfw-surface-2);border-bottom:1px solid var(--cjfw-divider);display:flex;align-items:center;gap:8px}
.cjfw-pane__h .ct{margin-left:auto;font-variant-numeric:tabular-nums}
.cjfw-pane__body{overflow-y:auto;padding:8px}
.cjfw-grantrow{display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:9px;cursor:pointer;transition:background var(--cjfw-fast)}
.cjfw-grantrow:hover{background:var(--cjfw-surface-2)}
.cjfw-grantrow__dot{width:26px;height:26px;border-radius:8px;flex:0 0 auto;display:grid;place-items:center;font-size:11px;font-weight:800;color:#fff}
.cjfw-grantrow__meta{min-width:0;flex:1}
.cjfw-grantrow__meta b{font-size:13px;font-weight:600;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-grantrow__meta span{font-size:11px;color:var(--cjfw-muted)}
.cjfw-grantrow__act{font-size:15px;color:var(--cjfw-muted);width:22px;text-align:center;flex:0 0 auto}
.cjfw-grantrow:hover .cjfw-grantrow__act{color:var(--cjfw-accent)}
.cjfw-pane--sel .cjfw-grantrow:hover .cjfw-grantrow__act{color:var(--cjfw-neg)}
/* diff-confirm bar (names the blast radius before commit) */
.cjfw-diff{display:none;padding:14px var(--cjfw-space-5);border-top:1px solid var(--cjfw-divider);
  background:color-mix(in srgb,var(--cjfw-warn) 8%,transparent)}
.cjfw-diff.is-open{display:block;animation:cjfwFade var(--cjfw-med) var(--cjfw-ease)}
.cjfw-diff__line{font-size:13px;display:flex;align-items:center;gap:9px;margin-bottom:6px}
.cjfw-diff__line i{width:16px;text-align:center}
.cjfw-diff__add{color:var(--cjfw-pos)}
.cjfw-diff__rem{color:var(--cjfw-neg)}
.cjfw-diff__warn{font-size:12.5px;color:var(--cjfw-warn);display:flex;align-items:flex-start;gap:8px;margin-top:8px;line-height:1.5}

/* ---- View-as amber context bar (S-20 — persistent, never silent) ---- */
.cjfw-viewas{
  position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:14px;
  padding:11px 28px;font-size:13.5px;font-weight:600;color:#1a0f06;
  background:linear-gradient(90deg,var(--cjfw-brand-amber),#ffc24d);
  border-bottom:1px solid color-mix(in srgb,#000 22%,var(--cjfw-brand-amber));
  box-shadow:0 6px 16px -10px rgba(0,0,0,.5);
}
.cjfw-viewas i.lead{font-size:15px}
.cjfw-viewas b{font-weight:800}
.cjfw-viewas .spacer{flex:1}
.cjfw-viewas form{margin:0}
.cjfw-viewas__exit{display:inline-flex;align-items:center;gap:7px;min-height:var(--cjfw-tap);padding:0 14px;border-radius:var(--cjfw-radius-pill);
  font-size:12.5px;font-weight:800;color:#1a0f06;background:rgba(255,255,255,.55);border:1px solid rgba(0,0,0,.25);cursor:pointer;
  transition:background var(--cjfw-fast)}
.cjfw-viewas__exit:hover{background:rgba(255,255,255,.8)}
@media(max-width:560px){.cjfw-viewas{padding:10px 16px;font-size:12.5px}}

/* definition list for the user detail */
.cjfw-dl{display:grid;grid-template-columns:160px 1fr;gap:0;padding:6px var(--cjfw-space-5) var(--cjfw-space-5)}
@media(max-width:560px){.cjfw-dl{grid-template-columns:1fr}}
.cjfw-dl dt{font-size:12.5px;color:var(--cjfw-muted);font-weight:600;padding:11px 0;border-bottom:1px solid var(--cjfw-border-soft)}
.cjfw-dl dd{font-size:13.5px;color:var(--cjfw-text);padding:11px 0;border-bottom:1px solid var(--cjfw-border-soft);display:flex;align-items:center;gap:9px}
@media(max-width:560px){.cjfw-dl dt{border-bottom:none;padding-bottom:2px}.cjfw-dl dd{padding-top:2px}}

/* error card (Change D) — rendered INSIDE the app shell content area for a signed-in
   user (rail + user menu + Sign out always present, no dead-end — LAW 13/33), and inside
   the bare .errpage centered card for an anonymous visitor. Same card either way. */
.cjfw-errcard{max-width:480px;margin:40px auto;text-align:center}
.cjfw-errcard__ic{width:64px;height:64px;border-radius:18px;margin:0 auto 22px;display:grid;place-items:center;
  background:color-mix(in srgb,var(--cjfw-accent) 14%,transparent);color:var(--cjfw-accent)}
.cjfw-errcard__ic svg{width:30px;height:30px}
.cjfw-errcard__code{font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--cjfw-muted)}
.cjfw-errcard__title{font-size:24px;font-weight:800;letter-spacing:-.02em;margin:8px 0 10px}
.cjfw-errcard__body{color:var(--cjfw-text-2);font-size:14.5px;line-height:1.6;margin-bottom:24px}
.cjfw-errcard__actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.cjfw-errcard__detail{margin-top:22px;font-family:var(--cjfw-font-mono);font-size:11.5px;color:var(--cjfw-muted);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius);padding:10px 12px;text-align:left;word-break:break-word}

/* ============================================================================
   CLIENT WORKSPACE CHROME (W0, S-24) — masthead / tab strip / scope-box exit /
   roster affordance. The masthead is a FIXED SLATE band — the constant "you are
   in a workspace" mode signal. It deliberately does NOT theme (like the brand
   mark): the per-client signal is the 3px brand THREAD on its top edge, fed by
   the page through --cjfw-ws-thread (token-driven, LAW 31; amber-range brand
   colors arrive pre-desaturated from CJFW_brand_thread_color — amber belongs
   exclusively to view-as, S-24).
   AMBER QUARANTINE: .cjfw-wsviewas is the ONE amber element permitted on any
   workspace page (Gauge visual gate). Its amber lives HERE, in the class — the
   page markup carries no inline amber token, so the exclusivity gate can assert
   the rendered HTML is amber-token-free.
   ============================================================================ */
.cjfw-wsmast{
  --cjfw-ws-thread:#5b6b7c;                    /* neutral fallback — never amber */
  position:relative;display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin:0 0 14px;padding:14px 16px 13px;border-radius:var(--cjfw-radius);
  background:#232b36;color:#e8edf4;            /* fixed slate — does not theme */
  border:1px solid #303a47;box-shadow:var(--cjfw-shadow-sm)}
.cjfw-wsmast::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;
  border-radius:var(--cjfw-radius) var(--cjfw-radius) 0 0;background:var(--cjfw-ws-thread)}
.cjfw-wsmast__tile{width:38px;height:38px;border-radius:10px;flex:0 0 auto;display:grid;place-items:center;
  font-weight:800;font-size:14px;color:#e8edf4;background:#303a47;overflow:hidden}
.cjfw-wsmast__tile img{width:100%;height:100%;object-fit:contain}
.cjfw-wsmast__id{display:flex;flex-direction:column;min-width:0}
.cjfw-wsmast__id b{font-size:15px;letter-spacing:-.01em;color:#fff}
.cjfw-wsmast__id .sub{font-size:11.5px;color:#9aa7b6}
.cjfw-wsmast__chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cjfw-wschip{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;
  padding:3px 9px;border-radius:var(--cjfw-radius-pill);color:#c3cdd9;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12)}
.cjfw-wschip i{font-size:10px}
.cjfw-wschip--status .dot{width:7px;height:7px;border-radius:50%;background:#8b97a5}
.cjfw-wschip--status.is-live .dot{background:var(--cjfw-pos)}
.cjfw-wsmast__spacer{flex:1}
.cjfw-wsback{display:inline-flex;align-items:center;gap:7px;min-height:var(--cjfw-tap);padding:0 13px;
  border-radius:var(--cjfw-radius-pill);font-size:12.5px;font-weight:700;color:#e8edf4;text-decoration:none;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16);transition:background var(--cjfw-fast)}
.cjfw-wsback:hover{background:rgba(255,255,255,.14)}
/* THE QUARANTINE: a hard divider walls the mode-handshake button off from the
   workspace verbs — it reads as "the door to the other mode", not another tool. */
.cjfw-wsdivider{width:1px;align-self:stretch;margin:2px 2px;background:rgba(255,255,255,.18)}
.cjfw-wsviewas{display:inline-flex;align-items:center;gap:8px;min-height:var(--cjfw-tap);padding:0 13px;
  border-radius:var(--cjfw-radius-pill);font-size:12.5px;font-weight:800;text-decoration:none;
  color:var(--cjfw-brand-amber);
  background:color-mix(in srgb,var(--cjfw-brand-amber) 13%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-brand-amber) 38%,transparent);
  transition:background var(--cjfw-fast)}
.cjfw-wsviewas:hover{background:color-mix(in srgb,var(--cjfw-brand-amber) 22%,transparent)}
.cjfw-wsviewas .cap{font-size:10px;font-weight:600;color:#9aa7b6;max-width:200px;line-height:1.25;text-align:left}
@media(max-width:760px){.cjfw-wsviewas .cap{display:none}}

/* Sub-tab strip — in-place no-flash swaps (LAW 32); plain links are the no-JS floor. */
.cjfw-wstabs{display:flex;gap:2px;margin:0 0 16px;border-bottom:1px solid var(--cjfw-border);}
.cjfw-wstab{display:inline-flex;align-items:center;gap:7px;min-height:var(--cjfw-tap);padding:0 14px;
  font-size:13px;font-weight:700;color:var(--cjfw-text-2);text-decoration:none;
  border-bottom:2px solid transparent;margin-bottom:-1px;transition:color var(--cjfw-fast)}
.cjfw-wstab:hover{color:var(--cjfw-text)}
.cjfw-wstab.is-active{color:var(--cjfw-accent);border-bottom-color:var(--cjfw-accent)}

/* Rail scope-box exit (the second persistent route out — M-69 no-trap). */
.cjfw-wsscopeout{display:inline-block;margin-top:6px;font-size:12px;font-weight:700;
  color:#fff;text-decoration:none;opacity:.9}
.cjfw-wsscopeout:hover{opacity:1;text-decoration:underline}

/* Roster "Open workspace →" affordance (m1) — quiet until the row is hovered or
   the link is focused; always present for touch/keyboard (never hover-only). */
.cjfw-openws{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;
  color:var(--cjfw-text-2);text-decoration:none;padding:6px 11px;border-radius:var(--cjfw-radius-pill);
  border:1px solid var(--cjfw-border);opacity:.55;transition:opacity var(--cjfw-fast),background var(--cjfw-fast)}
tr:hover .cjfw-openws,.cjfw-openws:focus-visible,.cjfw-openws:hover{opacity:1;background:var(--cjfw-surface-2)}

/* ============================================================================
   W1 — WORKSPACE CHROME COMPLETIONS (S-24 / blueprint W1)
   The client switcher, the tab-fallback notice, and the View-as handoff form.
   Same laws as everything above: tokens only, 44px tap floors, GPU motion.
   ============================================================================ */

/* The handoff form is layout-invisible: the quarantined button sits in the
   masthead flex exactly where the old anchor did. The button keeps the ONE
   permitted amber class (.cjfw-wsviewas, defined in the W0 section above) —
   these resets just neutralize <button> UA styling so anchor → button is a
   zero-pixel change. */
.cjfw-wsviewas-form{display:contents}
button.cjfw-wsviewas{font:inherit;font-size:12.5px;font-weight:800;cursor:pointer;
  -webkit-appearance:none;appearance:none}

/* THE CLIENT SWITCHER (Naomi's one-click jump; no-JS details/summary floor).
   Neutral slate styling — deliberately NOT amber (S-24 amber exclusivity) and
   quieter than the back-pill: switching is a lateral move, not an exit. */
.cjfw-wsswitch{position:relative}
.cjfw-wsswitch__btn{display:inline-flex;align-items:center;gap:7px;min-height:var(--cjfw-tap);
  padding:0 13px;border-radius:var(--cjfw-radius-pill);font-size:12.5px;font-weight:700;
  color:#e8edf4;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16);
  cursor:pointer;white-space:nowrap;list-style:none;transition:background var(--cjfw-fast)}
.cjfw-wsswitch__btn::-webkit-details-marker{display:none}
.cjfw-wsswitch__btn:hover{background:rgba(255,255,255,.14)}
.cjfw-wsswitch__btn .chev{font-size:10px;opacity:.7;transition:transform var(--cjfw-fast)}
.cjfw-wsswitch[open] .cjfw-wsswitch__btn .chev{transform:rotate(180deg)}
.cjfw-wsswitch__pop{position:absolute;right:0;top:calc(100% + 8px);z-index:60;min-width:240px;
  max-height:340px;overflow-y:auto;padding:6px;border-radius:12px;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);box-shadow:var(--cjfw-shadow)}
.cjfw-wsswitch__item{display:flex;align-items:center;gap:10px;min-height:var(--cjfw-tap);
  padding:6px 10px;border-radius:9px;color:var(--cjfw-text);text-decoration:none;font-size:13px;font-weight:600}
.cjfw-wsswitch__item:hover{background:var(--cjfw-surface-2)}
.cjfw-wsswitch__item .tile{width:26px;height:26px;border-radius:7px;flex:0 0 auto;display:grid;
  place-items:center;font-size:10.5px;font-weight:800;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-3);border:1px solid var(--cjfw-border)}
.cjfw-wsswitch__item .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cjfw-wsswitch__item > i{font-size:11px;color:var(--cjfw-muted)}

/* TAB-FALLBACK NOTICE — the honest one-liner on Overview after a switch/deep
   link to a tab this client doesn't have. Info-blue accents on neutral surface;
   never amber (view-as owns amber), never red (nothing is wrong). */
.cjfw-wsnotice{display:flex;align-items:center;gap:9px;margin:0 0 14px;padding:10px 14px;
  border-radius:10px;font-size:13px;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border)}
.cjfw-wsnotice i{color:var(--cjfw-info)}

/* ============================================================================
   W1 — CANVAS IA CSS MERGE (blueprint W1: "Canvas's cjfw-ia-proposed.css
   merges here"). Source: Staff/Canvas/PowerHouse-IA-mockups/assets/css/
   cjfw-ia-proposed.css (M-70). RECONCILIATION NOTE (honest, not silent): the
   proposal's masthead/sub-tab/back-pill/View-as base rules (.cjfw-wsmast,
   .cjfw-wstabs, .cjfw-wstab, .cjfw-wsback, .cjfw-wsviewas, .cjfw-wsbrand,
   .cjfw-wsid, .cjfw-wsmeta) were SUPERSEDED by the live W0 chrome above —
   that implementation is the Gauge-gated evolution of the same design (slate
   band, amber quarantine, desaturated thread) and re-importing the mockup
   versions would shadow it. What merges is everything the live app does NOT
   yet carry: the brand seam + integration identity tokens, the category chip,
   the tab count badge, the §3 integration-card family (W3 consumes it), and
   the §4 Overview knob/source/module-chip helpers (W2 consumes them).
   Selectors below are byte-faithful to Canvas's file.
   ============================================================================ */

/* ---- Per-client brand seam: each workspace sets --cjfw-ws-brand from the
   client's stored brand color (Brand section of the operating record). The
   admin chrome stays dark; ONLY the masthead accent + brand tile carry the
   client's color — enough to always know whose world you're in. ---- */
:root{ --cjfw-ws-brand: var(--cjfw-accent); }

/* category chip — the composition driver, always visible in the masthead */
.cjfw-cat{
  display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;
  padding:3px 10px;border-radius:var(--cjfw-radius-pill);line-height:1.4;
  color:var(--cjfw-text-2);background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
}
.cjfw-cat i{font-size:10.5px;color:var(--cjfw-ws-brand)}

/* sub-tab count badge (additive to the live .cjfw-wstab above) */
.cjfw-wstab .ct{font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;
  background:var(--cjfw-surface-3);color:var(--cjfw-text-2);
  padding:1px 7px;border-radius:var(--cjfw-radius-pill)}
.cjfw-wstab.is-active .ct{background:rgba(var(--cjfw-accent-rgb),.16);color:var(--cjfw-accent)}

/* ---- 3. Integration cards (both houses) ---- */
/* Integration identity colors — tokenized, never literals in components */
:root{
  --cjfw-int-cji:    var(--cjfw-brand-orange);
  --cjfw-int-google: #4285f4;   /* Google brand */
  --cjfw-int-ga4:    #e8710a;   /* GA4 brand */
  --cjfw-int-call:   #2bb3a3;   /* CallRail-class voice tracking */
}
.cjfw-intgrid{display:grid;grid-template-columns:1fr 1fr;gap:var(--cjfw-space-5)}
@media(max-width:900px){.cjfw-intgrid{grid-template-columns:1fr}}
.cjfw-intcard{display:flex;flex-direction:column}
/* the PRIORITY ONE seat — CJI gets the full row + the brand thread on top */
.cjfw-intcard--hero{grid-column:1 / -1;
  border-color:color-mix(in srgb,var(--cjfw-int-cji) 36%,var(--cjfw-border-soft));overflow:hidden}
.cjfw-intcard--hero::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,var(--cjfw-brand-orange),var(--cjfw-brand-amber))}
.cjfw-int__head{display:flex;align-items:center;gap:13px;padding:18px var(--cjfw-space-5) 12px}
.cjfw-int__ic{width:42px;height:42px;border-radius:12px;flex:0 0 auto;
  display:grid;place-items:center;font-size:18px;
  background:color-mix(in srgb,var(--cjfw-int-c,var(--cjfw-accent)) 14%,transparent);
  color:var(--cjfw-int-c,var(--cjfw-accent))}
.cjfw-int__name{min-width:0;flex:1}
.cjfw-int__name b{font-size:14.5px;font-weight:700;display:block;letter-spacing:-.01em}
.cjfw-int__name span{font-size:12px;color:var(--cjfw-muted)}
.cjfw-int__body{padding:2px var(--cjfw-space-5) 16px;flex:1}
.cjfw-int__foot{display:flex;align-items:center;gap:10px;
  padding:13px var(--cjfw-space-5);border-top:1px solid var(--cjfw-divider)}
.cjfw-int__foot .spacer{flex:1}

/* key/value truth rows — status copy is event-sourced, never fabricated (LAW 35) */
.cjfw-kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px 22px}
.cjfw-kv__item dt{font-size:10.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--cjfw-muted);margin-bottom:3px}
.cjfw-kv__item dd{font-size:13px;color:var(--cjfw-text);display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.cjfw-kv__item dd .mono{font-family:var(--cjfw-font-mono);font-size:12.5px;letter-spacing:-.01em}

/* data-flow chips — what actually moves over the link */
.cjfw-flowchip{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;
  color:var(--cjfw-text-2);background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  padding:3px 10px;border-radius:var(--cjfw-radius-pill)}
.cjfw-flowchip i{font-size:10px;color:var(--cjfw-int-cji)}

/* the 4-step link flow, shown completed on a linked card / live during linking */
.cjfw-linkflow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:14px}
.cjfw-linkstep{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:var(--cjfw-text-2)}
.cjfw-linkstep .n{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;
  font-size:10.5px;font-weight:800;background:var(--cjfw-surface-3);color:var(--cjfw-muted);
  border:1px solid var(--cjfw-border)}
.cjfw-linkstep.is-done{color:var(--cjfw-text-2)}
.cjfw-linkstep.is-done .n{background:color-mix(in srgb,var(--cjfw-pos) 18%,transparent);
  color:var(--cjfw-pos);border-color:color-mix(in srgb,var(--cjfw-pos) 40%,transparent)}
.cjfw-linkstep.is-now .n{background:var(--cjfw-accent);color:var(--cjfw-accent-ink);border-color:transparent}
.cjfw-linkflow .sep{width:14px;height:1px;background:var(--cjfw-divider)}

/* attached-account row (the Lead-Audit multi-account pattern, re-skinned) */
.cjfw-acctrow{display:flex;align-items:center;gap:12px;padding:10px 13px;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);
  border-left:3px solid var(--cjfw-int-google);border-radius:10px;margin-bottom:8px}
.cjfw-acctrow__ic{width:30px;height:30px;border-radius:8px;flex:0 0 auto;display:grid;place-items:center;
  font-size:13px;background:color-mix(in srgb,var(--cjfw-int-google) 13%,transparent);color:var(--cjfw-int-google)}
.cjfw-acctrow__meta{flex:1;min-width:0}
.cjfw-acctrow__meta b{font-size:13px;font-weight:600;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cjfw-acctrow__meta .cid{font-family:var(--cjfw-font-mono);font-size:11px;color:var(--cjfw-muted);margin-top:1px}
.cjfw-tagchip{font-size:10.5px;font-weight:700;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-3);border:1px solid var(--cjfw-border-soft);
  padding:1px 8px;border-radius:var(--cjfw-radius-pill)}

/* "add an integration" — the modular seam made visible */
.cjfw-addint{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  border:1.5px dashed var(--cjfw-border);border-radius:var(--cjfw-radius-lg);
  padding:26px 20px;text-align:center;color:var(--cjfw-muted);cursor:pointer;
  transition:border-color var(--cjfw-fast) var(--cjfw-ease),color var(--cjfw-fast) var(--cjfw-ease)}
.cjfw-addint:hover{border-color:color-mix(in srgb,var(--cjfw-accent) 50%,var(--cjfw-border));color:var(--cjfw-text-2)}
.cjfw-addint__ic{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-size:16px;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);color:var(--cjfw-muted)}
.cjfw-addint b{font-size:13.5px;color:var(--cjfw-text-2)}
.cjfw-addint .avail{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}

/* client-house connection card — same geometry, plain language, read-mostly */
.cjfw-conn p{font-size:13.5px;color:var(--cjfw-text-2);line-height:1.6}
.cjfw-conn__truth{display:flex;align-items:center;gap:8px;margin-top:12px;
  font-size:12px;color:var(--cjfw-muted)}
.cjfw-conn__truth i{font-size:11px}

/* ---- 4. Admin-Overview knob helpers ---- */
.cjfw-knobrow{display:flex;align-items:center;gap:13px;padding:11px var(--cjfw-space-5);
  border-bottom:1px solid var(--cjfw-border-soft)}
.cjfw-knobrow:last-child{border-bottom:none}
.cjfw-knobrow__meta{flex:1;min-width:0}
.cjfw-knobrow__meta b{font-size:13px;font-weight:600;display:block}
.cjfw-knobrow__meta span{font-size:11.5px;color:var(--cjfw-muted)}
.cjfw-knobrow .bud{font-family:var(--cjfw-font-mono);font-size:12.5px;font-weight:700;
  color:var(--cjfw-text);white-space:nowrap}
.cjfw-srcrow{display:flex;align-items:center;gap:11px;padding:10px var(--cjfw-space-5);
  border-bottom:1px solid var(--cjfw-border-soft);font-size:12.5px}
.cjfw-srcrow:last-child{border-bottom:none}
.cjfw-srcrow__ic{width:28px;height:28px;border-radius:8px;flex:0 0 auto;display:grid;place-items:center;font-size:12px;
  background:color-mix(in srgb,var(--cjfw-int-c,var(--cjfw-muted)) 13%,transparent);color:var(--cjfw-int-c,var(--cjfw-muted))}
.cjfw-srcrow__meta{flex:1;min-width:0}
.cjfw-srcrow__meta b{font-size:12.5px;font-weight:600;display:block}
.cjfw-srcrow__meta span{font-size:11px;color:var(--cjfw-muted)}
.cjfw-modchips{display:flex;gap:7px;flex-wrap:wrap;padding:14px var(--cjfw-space-5)}
.cjfw-modchip{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;
  color:var(--cjfw-pos);background:color-mix(in srgb,var(--cjfw-pos) 11%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-pos) 28%,transparent);
  padding:4px 11px;border-radius:var(--cjfw-radius-pill)}
.cjfw-modchip--off{color:var(--cjfw-muted);background:var(--cjfw-surface-2);border-color:var(--cjfw-border)}

/* ============================================================================
   W2 — VISIBLE PHASES additions (M-71). Tokens only (LAW 30/31). The intcard
   family itself merged in W1 (section 3 above); these are the small pieces the
   built surfaces need that no mockup class carried.
   ============================================================================ */

/* THE ONE PERMITTED ROADMAP ELEMENT (blueprint §4 planned-row rule): the
   explicitly-labeled dashed row on the CJI card — admin-face only, claims
   nothing flows. Deliberately NOT a .cjfw-flowchip: flow chips are event-
   sourced or absent (Gauge gate: no sharing chip without a backing event row),
   so the roadmap row is its own class and the DOM assertion stays clean. */
.cjfw-plannedrow{display:flex;align-items:center;gap:9px;margin-top:12px;padding:9px 13px;
  border:1.5px dashed var(--cjfw-border);border-radius:10px;font-size:12px;
  color:var(--cjfw-muted)}
.cjfw-plannedrow i{font-size:11px}

/* Audit readback table helpers — chain position + hash tail render mono. */
.cjfw-auditmono{font-family:var(--cjfw-font-mono);font-size:11.5px;color:var(--cjfw-muted)}

/* Mirror affordance (blueprint §2): the quiet standing line on mirrored tabs.
   Muted text, NEVER amber — the masthead View-as button stays the page's one
   amber element (S-24 amber exclusivity). */
.cjfw-wsmirror{display:flex;align-items:center;gap:8px;margin:14px 0 0;font-size:12px;
  color:var(--cjfw-muted)}
.cjfw-wsmirror i{font-size:11px}

/* ============================================================================
   JOURNEY SPINE P4 — JOURNEY SURFACES (merged from Canvas's C-79 proposal
   cjfw-journey-proposed.css per the W1 cjfw-ia-proposed.css precedent; the
   proposal sheet does NOT ship — this section is the single live copy. N-32.)

   Laws honored: tokens only (LAW 30/31) — every color resolves through the
   section-1 tokens or a color-mix of them; NO new palette. NO animation and
   NO @keyframes anywhere in THIS SECTION: the journey surfaces are server-
   rendered-whole (no-flash structurally) and the "live" chip is deliberately
   pulse-free — motion would imply refresh activity we are not performing.
   S-14 floors: 44px targets on anything interactive (all interactive elements
   reuse .cjfw-btn), shape+text+color triple-encoding on warn states.

   Sections:  1. FRESHNESS CHIP   (.cjfw-fresh — 9 closed-vocabulary states)
              2. JOURNEY TIMELINE (.cjfw-jtl — story steps / gaps / the win)
              3. JOURNEY CARD     (.cjfw-jcard / .cjfw-jfrom / .cjfw-jai)
              4. ADVANCED DRILL   (.cjfw-jdrill / .cjfw-jattr / .cjfw-jsess)
   Companion spec: Staff/Canvas/journey-views-design-spec-v1.md
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. FRESHNESS CHIP — doctrine §H closed vocabulary, nine states, no naked
   numbers. The visible TEXT is the vocabulary; tones collapse to four skins:
   pos (live) / neutral (ago, hourly, daily, curmo, prevmo — the base skin) /
   locked (final) / warn (pending, est — must read as warnings).
   ---------------------------------------------------------------------------- */
.cjfw-fresh{
  display:inline-flex;align-items:center;gap:5px;
  font-size:10.5px;font-weight:700;letter-spacing:.02em;line-height:1.4;
  font-variant-numeric:tabular-nums;white-space:nowrap;
  padding:2px 8px;border-radius:var(--cjfw-radius-pill);
  color:var(--cjfw-muted);
  background:color-mix(in srgb,var(--cjfw-muted) 10%,transparent);
  border:1px solid var(--cjfw-border);
}
.cjfw-fresh i{font-size:9px;line-height:1}
/* live's indicator is a STATIC dot — never animated (pulse implies motion) */
.cjfw-fresh .dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex:0 0 auto}

/* live — pos-toned, computed-at-read truth */
.cjfw-fresh--live{
  color:var(--cjfw-pos);
  background:color-mix(in srgb,var(--cjfw-pos) 12%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-pos) 30%,transparent);
}
/* neutral tiers ride the base skin — kept as named hooks so templates always
   carry the explicit state class (Gauge's no-naked-numbers assertion keys on it) */
.cjfw-fresh--ago,.cjfw-fresh--hourly,.cjfw-fresh--daily,
.cjfw-fresh--curmo,.cjfw-fresh--prevmo{color:var(--cjfw-muted)}

/* final (locked YYYY-MM) — quiet certainty: a fact, not an alert */
.cjfw-fresh--final{
  color:var(--cjfw-text-2);
  background:var(--cjfw-surface-3);
  border-color:var(--cjfw-border);
}
/* warning states — pending sync / estimated · incomplete. Icon is mandatory in
   markup (shape + color + text — S-14 triple encoding). */
.cjfw-fresh--pending,.cjfw-fresh--est{
  color:var(--cjfw-warn);
  background:color-mix(in srgb,var(--cjfw-warn) 13%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-warn) 36%,transparent);
}

/* ----------------------------------------------------------------------------
   2. JOURNEY TIMELINE — semantic <ol class="cjfw-jtl">; dots + connector are
   pure decoration (icons aria-hidden), the TEXT carries the story. Three step
   kinds: plain step / --gap (left-and-returned, dashed) / --win (conversion,
   pos-toned, always FINAL — the connector ends with the story).
   ---------------------------------------------------------------------------- */
.cjfw-jtl{list-style:none;margin:0;padding:0}
.cjfw-jtl__step{position:relative;display:flex;align-items:flex-start;gap:14px;padding:0 0 22px}
.cjfw-jtl__step:last-child{padding-bottom:0}
/* the connector — runs from below this dot to the next; solid by default */
.cjfw-jtl__step::before{
  content:"";position:absolute;left:15px;top:36px;bottom:-2px;width:2px;
  background:var(--cjfw-divider);
}
.cjfw-jtl__step:last-child::before{display:none}

.cjfw-jtl__dot{
  width:32px;height:32px;border-radius:50%;flex:0 0 auto;
  display:grid;place-items:center;font-size:12.5px;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  color:var(--cjfw-text-2);
  position:relative;z-index:1;            /* sits on top of the connector */
}
.cjfw-jtl__body{flex:1;min-width:0;padding-top:4px}
.cjfw-jtl__body b{font-size:13.5px;font-weight:700;display:block;letter-spacing:-.01em}
.cjfw-jtl__body span{font-size:12px;color:var(--cjfw-muted);line-height:1.45}
.cjfw-jtl__when{
  flex:0 0 auto;padding-top:6px;font-size:11.5px;color:var(--cjfw-muted);
  font-variant-numeric:tabular-nums;white-space:nowrap;
}

/* GAP row — "left, then came back" derived from session boundaries. Dashed
   circle + dashed connector segment; one muted line, no timestamp. */
.cjfw-jtl__step--gap .cjfw-jtl__dot{
  background:transparent;border:1.5px dashed var(--cjfw-border);color:var(--cjfw-muted);
}
.cjfw-jtl__step--gap::before{
  width:0;background:none;border-left:2px dashed var(--cjfw-divider);
}
.cjfw-jtl__step--gap .cjfw-jtl__body b{
  font-weight:600;font-style:italic;color:var(--cjfw-text-2);font-size:12.5px;
}

/* WIN row — the conversion, the story's ending. Pos circle, bold label;
   the badge-proven pos mix recipe keeps AA on every theme. */
.cjfw-jtl__step--win .cjfw-jtl__dot{
  background:color-mix(in srgb,var(--cjfw-pos) 15%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-pos) 42%,transparent);
  color:var(--cjfw-pos);
}
.cjfw-jtl__step--win .cjfw-jtl__body b{color:var(--cjfw-pos);font-size:14px}

/* ----------------------------------------------------------------------------
   3. JOURNEY CARD — one lead's story, top to bottom (client face; byte-
   identical under view-as, S-23). Extends .cjfw-card; blocks: head /
   "where they came from" / "what they did" / foot (AI line + action slot).
   ---------------------------------------------------------------------------- */
.cjfw-jcard__head{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:var(--cjfw-space-5);border-bottom:1px solid var(--cjfw-divider);
}
.cjfw-jcard__av{
  width:44px;height:44px;border-radius:13px;flex:0 0 auto;
  display:grid;place-items:center;font-weight:800;font-size:15px;color:#fff;
  background:linear-gradient(135deg,var(--cjfw-brand-plum),var(--cjfw-accent));
}
.cjfw-jcard__id{min-width:0;flex:1}
.cjfw-jcard__id h2{font-size:17px;font-weight:800;letter-spacing:-.02em;line-height:1.2}
.cjfw-jcard__sub{font-size:12.5px;color:var(--cjfw-muted);margin-top:2px}
.cjfw-jcard__status{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* "Where they came from" — labeled 3-cell row (.cjfw-eyebrow heads the block) */
.cjfw-jfrom{
  display:grid;grid-template-columns:repeat(3,1fr);gap:14px;
  padding:16px var(--cjfw-space-5);border-bottom:1px solid var(--cjfw-divider);
}
.cjfw-jfrom__cell{display:flex;align-items:flex-start;gap:11px;min-width:0}
.cjfw-jfrom__ic{
  width:34px;height:34px;border-radius:10px;flex:0 0 auto;
  display:grid;place-items:center;font-size:14px;
  background:color-mix(in srgb,var(--cjfw-info) 13%,transparent);color:var(--cjfw-info);
}
.cjfw-jfrom__cell b{font-size:13px;font-weight:700;display:block;letter-spacing:-.01em}
.cjfw-jfrom__cell span{font-size:11.5px;color:var(--cjfw-muted);line-height:1.4;display:block}

/* the timeline block's padding home ("What they did" + the <ol>) */
.cjfw-jcard__story{padding:16px var(--cjfw-space-5) var(--cjfw-space-5)}
.cjfw-jcard__story .cjfw-eyebrow{display:block;margin-bottom:14px}

/* Footer — AI suggestion line + the embed-filled action slot. The AI line is
   ADVISORY by contract: the sparkle is plum (mixed toward text ink for AA —
   never raw plum as text on dark), the "(AI suggestion — advisory only)"
   marker always renders when the line does. Slot empty in the client house. */
.cjfw-jcard__foot{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:14px var(--cjfw-space-5);border-top:1px solid var(--cjfw-divider);
}
.cjfw-jcard__foot .spacer{flex:1}
.cjfw-jai{display:flex;align-items:flex-start;gap:9px;min-width:0;flex:1 1 320px;
  font-size:12.5px;color:var(--cjfw-text-2);line-height:1.5}
.cjfw-jai i{
  margin-top:2px;font-size:12px;
  color:color-mix(in srgb,var(--cjfw-brand-plum) 45%,var(--cjfw-text));
}
.cjfw-jai__tag{color:var(--cjfw-muted);font-size:11px;font-weight:600;white-space:nowrap}

/* ----------------------------------------------------------------------------
   4. ADVANCED DRILL — workspace-only event-level view. Dense is fine, honest
   is mandatory: stitch facts visible, three attribution renderings LABELED as
   renderings, session boundaries structural, bot flags shown never hidden,
   form behavior = names/counts only.
   ---------------------------------------------------------------------------- */
.cjfw-jdrill{display:flex;flex-direction:column;gap:var(--cjfw-space-5)}
.cjfw-jdrill__head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.cjfw-jdrill__vid{
  font-family:var(--cjfw-font-mono);font-size:11px;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  padding:2px 8px;border-radius:var(--cjfw-radius-pill);letter-spacing:-.01em;
}
/* bot-flag presence line — warn family, text carries the count */
.cjfw-jdrill__botline{
  display:flex;align-items:center;gap:8px;font-size:12.5px;line-height:1.5;
  color:var(--cjfw-warn);padding:9px 13px;border-radius:10px;
  background:color-mix(in srgb,var(--cjfw-warn) 9%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-warn) 28%,transparent);
}

/* Attribution — three renderings of ONE truth, side by side. The standing
   note above the columns is part of the component, not optional copy. */
.cjfw-jattr{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.cjfw-jattr__note{
  grid-column:1 / -1;display:flex;align-items:center;gap:8px;
  font-size:12px;color:var(--cjfw-muted);line-height:1.5;
}
.cjfw-jattr__note i{font-size:11px}
.cjfw-jattr__col{
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);
  border-radius:var(--cjfw-radius);padding:13px 15px;min-width:0;
}
.cjfw-jattr__col>h4{
  font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--cjfw-muted);margin-bottom:9px;display:flex;align-items:center;gap:7px;
}
.cjfw-jattr__col dl{display:flex;flex-direction:column;gap:6px}
.cjfw-jattr__col dt{font-size:10.5px;font-weight:700;color:var(--cjfw-muted)}
.cjfw-jattr__col dd{font-size:12px;color:var(--cjfw-text);word-break:break-word}
.cjfw-jattr__col dd.mono{font-family:var(--cjfw-font-mono);font-size:11.5px;letter-spacing:-.01em}

/* Session block — the boundary IS the structure; events live inside it. */
.cjfw-jsess{
  border:1px solid var(--cjfw-border-soft);border-radius:var(--cjfw-radius);
  overflow:hidden;
}
.cjfw-jsess__head{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:11px 14px;background:var(--cjfw-surface-2);
  border-bottom:1px solid var(--cjfw-divider);
}
.cjfw-jsess__head b{font-size:13px;font-weight:700;letter-spacing:-.01em}
.cjfw-jsess__head .meta{font-size:11.5px;color:var(--cjfw-muted);font-variant-numeric:tabular-nums}
.cjfw-jsess__head .spacer{flex:1}
.cjfw-jsess__chips{display:flex;gap:6px;flex-wrap:wrap}

/* event-table column discipline (rides .cjfw-table): exact times mono */
.cjfw-jdrill__evt td.t{
  font-family:var(--cjfw-font-mono);font-size:11.5px;color:var(--cjfw-text-2);
  white-space:nowrap;letter-spacing:-.01em;
}
.cjfw-jdrill__evt td.et{font-size:12px;font-weight:600;white-space:nowrap}
.cjfw-jdrill__evt td .path{font-family:var(--cjfw-font-mono);font-size:11px;color:var(--cjfw-muted)}

/* Per-field form behavior — names/counts only; the "no typed values" standing
   line reuses .cjfw-jattr__note styling via this alias for clean markup. */
.cjfw-jform{display:flex;flex-direction:column;gap:10px}
.cjfw-jform__row{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:10px 13px;border-radius:10px;font-size:12.5px;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);
}
.cjfw-jform__row b{font-weight:700}
.cjfw-jform__row .fld{
  font-family:var(--cjfw-font-mono);font-size:11px;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-3);padding:1px 7px;border-radius:var(--cjfw-radius-pill);
}
.cjfw-jform__note{display:flex;align-items:center;gap:8px;font-size:12px;
  color:var(--cjfw-muted);line-height:1.5}
.cjfw-jform__note i{font-size:11px}

/* ---- Responsive (LAW 25 — reflow, not stretch) ---- */
@media (max-width:900px){
  .cjfw-jattr{grid-template-columns:1fr}
}
@media (max-width:560px){
  .cjfw-jfrom{grid-template-columns:1fr;gap:12px}
  .cjfw-jtl__when{display:block;padding-top:2px}
  .cjfw-jtl__step{flex-wrap:wrap}
  .cjfw-jtl__step .cjfw-jtl__when{order:3;margin-left:46px}
}

/* ============================================================================
   5. VERDICT CONTROL + OUTCOME DISPLAY  (L3 — Canvas verdict-and-outcome spec)
   The human-judgment write surface (the ONE interactive surface on the journey
   page) + the two-axis outcome strip. Tokens only; NO @keyframes (busy = opacity
   + "…", never a spinner — motion would imply a refresh we do not run). 44px
   targets, :focus-visible rings. The verdict was instantaneous server-side; the
   swap is instantaneous too — no fade, no slide, no theatre.

   Companion specs: Staff/Canvas/verdict-and-outcome-design-spec-v1.md +
   Staff/Morgan/powerhouse-dev-plan/L3-verdict-outcome-spec.md
   ============================================================================ */
:root{ --cjfw-verdict-h: 92px; }   /* reserved height: ask & recorded match → no jump on swap */

.cjfw-verdict__body{min-height:var(--cjfw-verdict-h);
  display:flex;align-items:center;padding:16px var(--cjfw-space-5)}

/* ASK (state A) — the prompt + the two primary buttons (+ More on detail). */
.cjfw-verdict__prompt{font-size:13.5px;font-weight:700;margin:0 14px 0 0;letter-spacing:-.01em}
.cjfw-verdict__ask{display:flex;align-items:center;gap:12px;flex-wrap:wrap;width:100%}
.cjfw-verdict__ask[hidden]{display:none}
.cjfw-verdict__choices{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* The verdict buttons — reuse the .cjfw-btn 44px floor, get an intent skin.
   yes = pos, no = neg, more = ghost. Icon-only compact variant stays 44px. */
.cjfw-vbtn{display:inline-flex;align-items:center;gap:8px;min-height:var(--cjfw-tap);
  padding:0 16px;border-radius:var(--cjfw-radius-sm);font-size:13.5px;font-weight:700;
  border:1px solid var(--cjfw-border);background:var(--cjfw-surface-2);color:var(--cjfw-text);
  cursor:pointer;transition:background var(--cjfw-fast) var(--cjfw-ease),
                          border-color var(--cjfw-fast) var(--cjfw-ease)}
.cjfw-vbtn i{font-size:13px}
.cjfw-vbtn:focus-visible{outline:2px solid var(--cjfw-focus);outline-offset:2px}
.cjfw-vbtn--yes:hover{background:color-mix(in srgb,var(--cjfw-pos) 16%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-pos) 42%,transparent);color:var(--cjfw-pos)}
.cjfw-vbtn--no:hover{background:color-mix(in srgb,var(--cjfw-neg) 14%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-neg) 40%,transparent);color:var(--cjfw-neg)}
.cjfw-vbtn--neg:hover{background:color-mix(in srgb,var(--cjfw-neg) 14%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-neg) 40%,transparent);color:var(--cjfw-neg)}
.cjfw-vbtn--pos:hover,.cjfw-vbtn--strong:hover{background:color-mix(in srgb,var(--cjfw-pos) 16%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-pos) 42%,transparent);color:var(--cjfw-pos)}
.cjfw-vbtn--muted:hover{background:var(--cjfw-surface-3)}
.cjfw-vbtn--more{background:transparent}
.cjfw-vbtn--more:hover{background:var(--cjfw-surface-3)}
.cjfw-vbtn[disabled]{opacity:.45;cursor:default}
/* BUSY (state B) — dimmed label + a static "…", NO spin. A targeted class on the
   clicked button only; no reflow, nothing leaves the DOM. */
.cjfw-vbtn.is-busy{opacity:.6;pointer-events:none}
.cjfw-vbtn.is-busy::after{content:"…";margin-left:2px}

/* "More…" disclosure — collapsed; the optional reason lives here, never required. */
.cjfw-verdict__more{flex-basis:100%;margin-top:10px;display:flex;flex-direction:column;gap:10px}
.cjfw-verdict__more[hidden]{display:none}
.cjfw-verdict__reason{display:block}
.cjfw-verdict__reason input{width:100%;min-height:var(--cjfw-tap);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  border-radius:var(--cjfw-radius-sm);padding:0 12px;color:var(--cjfw-text);font-size:13px}
.cjfw-verdict__reason input:focus-visible{outline:2px solid var(--cjfw-focus);outline-offset:1px}
.cjfw-verdict__reason .cjfw-eyebrow{display:block;margin-bottom:5px}

/* RECORDED (state C) — the verdict, who/when, the optional note, and Change. */
.cjfw-verdict__recorded{display:flex;align-items:center;gap:13px;width:100%}
.cjfw-verdict__recorded[hidden]{display:none}
.cjfw-verdict__mark{width:38px;height:38px;border-radius:11px;flex:0 0 auto;
  display:grid;place-items:center;font-size:15px}
.cjfw-verdict__mark--pos{background:color-mix(in srgb,var(--cjfw-pos) 15%,transparent);color:var(--cjfw-pos)}
.cjfw-verdict__mark--neg{background:color-mix(in srgb,var(--cjfw-neg) 14%,transparent);color:var(--cjfw-neg)}
.cjfw-verdict__mark--warn{background:color-mix(in srgb,var(--cjfw-warn) 14%,transparent);color:var(--cjfw-warn)}
.cjfw-verdict__mark--muted{background:var(--cjfw-surface-3);color:var(--cjfw-muted)}
.cjfw-verdict__said{min-width:0;display:flex;flex-direction:column;gap:2px}
.cjfw-verdict__said b{font-size:14px;font-weight:800;letter-spacing:-.01em}
.cjfw-verdict__by{font-size:11.5px;color:var(--cjfw-muted)}
.cjfw-verdict__note{font-size:12px;color:var(--cjfw-text-2);font-style:italic}

/* REFUSED / NET (state D) — warn family, icon mandatory (S-14 triple-encode). */
.cjfw-verdict__refusal{display:flex;align-items:center;gap:8px;margin:10px 0 0;
  font-size:12.5px;line-height:1.5;color:var(--cjfw-warn);
  padding:9px 13px;border-radius:10px;
  background:color-mix(in srgb,var(--cjfw-warn) 9%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-warn) 28%,transparent)}
.cjfw-verdict__refusal i{font-size:11px}

/* ---- OUTCOME STRIP — two axes, a rule between, NEVER fused (§0 doctrine) ---- */
.cjfw-outcome{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;
  gap:16px;padding:13px var(--cjfw-space-5);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);
  border-radius:var(--cjfw-radius)}
.cjfw-outcome__axis{display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-width:0}
.cjfw-outcome__axis .cjfw-eyebrow{flex-basis:100%;margin-bottom:3px}
.cjfw-outcome__src{font-size:11px;color:var(--cjfw-muted)}
.cjfw-outcome__rule{width:1px;align-self:stretch;background:var(--cjfw-divider)}

/* ---- STAFF verdict-history block (§6.3) — rides the existing .cjfw-table. ---- */
.cjfw-jvlog{margin-top:14px}
.cjfw-jvlog .cjfw-jform__note{margin-bottom:8px}

@media (max-width:640px){
  .cjfw-outcome{grid-template-columns:1fr;gap:12px}
  .cjfw-outcome__rule{width:auto;height:1px}
  .cjfw-verdict__choices{width:100%}
  .cjfw-vbtn{flex:1 1 auto;justify-content:center}
}

/* ============================================================================
   6. FINANCIALS — money vocabulary + ledger components
   Merged from Canvas's cjfw-cockpit-proposed.css (§0 money · §5 ledger ·
   §9 source pills/roll-up · §12 capability strip) per Dave's 2026-07-02
   rulings (Decisions/2026-07-02 cockpit-design-rulings.md — ruling 1 ratified
   the money tokens with both conditions; ruling 5 is the capability strip;
   ruling 6: NO masthead theme switcher — theme lives in user Settings).
   Visual contract: Staff/Canvas/cockpit-mockups-2026-07/workspace-client.html.
   ============================================================================ */

/* ---- 6.0 MONEY TOKENS — RATIFIED 2026-07-02 (ruling 1). The fixed DNA-3
   vocabulary on every financial surface, at every altitude: the client PAYS US
   in blue → SPENDS ON ADS in amber → MAKES MONEY in green. Blue = the
   contractual, trusted number (never alarming, can sit beside a red signal
   without borrowing its anxiety). Amber = money in motion, fuel burning toward
   a cap — pacing-aware, one step shy of warning; deliberately NOT
   --cjfw-brand-amber (the S-24 amber-exclusivity gate stays assertable —
   view-as owns brand amber) and NOT --cjfw-warn (escalation still has
   somewhere to go). Green = gain — kept teal-leaning so "$38,450" (a fact)
   never reads as "GOOD" (a judgment, --cjfw-pos). Ruling-1 condition 2: every
   registered theme (S-6) carries its own tuned triplet, contrast-verified
   >=4.5:1 (AA small text) against that theme's card surface; a future theme
   registration MUST supply its triplet (the S-6 checklist gains a
   "money tokens tuned?" line). Full rationale: cockpit START-HERE.md. ---- */
:root{
  --cjfw-money-fee:     #5b8def;   /* what the client pays us  · 5.3:1 on #161b26 */
  --cjfw-money-spend:   #f2a33c;   /* what they spend on ads   · 8.3:1 */
  --cjfw-money-revenue: #36c2a4;   /* what they make           · 7.7:1 */
}
[data-cjfw-theme="jolt"]{
  --cjfw-money-fee:     #7da2f0;   /* lifted — cool blue must pop on warm dark · 7.1:1 on #1f150d */
  --cjfw-money-spend:   #ffc46b;   /* gold, pushed away from Jolt's red-orange accent · 11.4:1 */
  --cjfw-money-revenue: #4ecfae;   /* teal-green, unmistakable on brown · 9.3:1 */
}
/* Tesla REBUILT dark (2026-07-11) — the old light-surface triplet retired with
   the light look; retuned for the midnight-lab card surface. */
[data-cjfw-theme="tesla"]{
  --cjfw-money-fee:     #7ba4f5;   /* lifted for near-black navy · 7.4:1 on #0e1424 */
  --cjfw-money-spend:   #f5b04a;   /* 9.8:1 */
  --cjfw-money-revenue: #3bd6b0;   /* 10.0:1 */
}
/* Theme-expansion triplets (Canvas 2026-07-11) — ruling-1 condition 2: every
   registered theme supplies its tuned triplet, >=4.5:1 vs its card surface.
   Ratios from the 2026-07-11 theme_contrast.py harness run. */
[data-cjfw-theme="electric"]{
  --cjfw-money-fee:     #6ea9ff;   /* 7.1:1 on #0c1c33 */
  --cjfw-money-spend:   #f0a848;   /* 8.5:1 */
  --cjfw-money-revenue: #35d0a2;   /* 8.7:1 */
}
[data-cjfw-theme="plasma"]{
  --cjfw-money-fee:     #8fa8ff;   /* 8.0:1 on #1c0f2a */
  --cjfw-money-spend:   #f0a848;   /* 9.0:1 */
  --cjfw-money-revenue: #3bd6a4;   /* 9.9:1 */
}
[data-cjfw-theme="surge"]{
  --cjfw-money-fee:     #6ea9ff;   /* 7.1:1 on #0c2016 */
  --cjfw-money-spend:   #f0a848;   /* 8.4:1 */
  --cjfw-money-revenue: #3fd0c0;   /* teal pushed FURTHER from surge's green accent · 8.9:1 */
}
[data-cjfw-theme="plutonium"]{
  --cjfw-money-fee:     #7da2f0;   /* 7.3:1 on #131030 */
  --cjfw-money-spend:   #f0a848;   /* 9.1:1 */
  --cjfw-money-revenue: #38d3ae;   /* 9.7:1 */
}
[data-cjfw-theme="ignite"]{
  --cjfw-money-fee:     #8fa8ff;   /* cool blue must pop on warm carbon · 7.9:1 on #1e1412 */
  --cjfw-money-spend:   #ffc46b;   /* 11.5:1 */
  --cjfw-money-revenue: #45d0a8;   /* 9.3:1 */
}
/* LIGHT themes share one deepened triplet — same hue vocabulary, luminance
   dropped for white-family cards (the old light-tesla precedent, retuned). */
[data-cjfw-theme="edison"],
[data-cjfw-theme="arc"],
[data-cjfw-theme="ion"],
[data-cjfw-theme="spark"]{
  --cjfw-money-fee:     #2456c4;   /* 6.4-6.6:1 across the four light surfaces */
  --cjfw-money-spend:   #8f5c08;   /* 5.5-5.7:1 */
  --cjfw-money-revenue: #15734a;   /* 5.7-5.9:1 */
}
.cjfw-mny-fee{color:var(--cjfw-money-fee)}
.cjfw-mny-spend{color:var(--cjfw-money-spend)}
.cjfw-mny-rev{color:var(--cjfw-money-revenue)}

/* ---- 6.1 THE LEDGER (DNA-7) — effective-dated component: whole history
   visible, governing row highlighted (ACTIVE), future rows inert (SCHEDULED,
   dimmed-forward), per-card search + pager INSIDE the card (DNA-6) so a
   61-month history never hijacks its page, and the resolution contract stated
   as microcopy on the surface (DNA-8). ---- */
.cjfw-fingrid{display:grid;grid-template-columns:1fr 1fr;gap:var(--cjfw-space-5);
  align-items:start;margin-bottom:var(--cjfw-space-5)}
@media(max-width:1150px){.cjfw-fingrid{grid-template-columns:1fr}}
.cjfw-ledger__cur{display:flex;align-items:baseline;gap:9px;font-variant-numeric:tabular-nums}
.cjfw-ledger__cur b{font-size:19px;font-weight:800;letter-spacing:-.02em}
.cjfw-ledger__cur b small{font-size:12px;font-weight:600}
.cjfw-ledger__cur span{font-size:11.5px;color:var(--cjfw-muted)}
.cjfw-minisearch{display:flex;align-items:center;gap:8px;height:36px;padding:0 12px;min-width:150px;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius-pill);
  color:var(--cjfw-muted);font-size:12px}
.cjfw-minisearch input{flex:1;background:none;border:none;color:var(--cjfw-text);font-size:12.5px;outline:none;min-width:0}
.cjfw-minisearch input::placeholder{color:var(--cjfw-muted)}
.cjfw-lrow{display:grid;grid-template-columns:96px 1fr auto auto;align-items:center;gap:14px;
  padding:11px var(--cjfw-space-5);border-bottom:1px solid var(--cjfw-border-soft);font-size:13px;
  border-left:3px solid transparent}
.cjfw-lrow .mon{font-family:var(--cjfw-font-mono);font-size:12px;color:var(--cjfw-text-2);letter-spacing:-.01em}
.cjfw-lrow .kind{font-size:12.5px;color:var(--cjfw-text-2);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cjfw-lrow .kind .note{font-size:11.5px;color:var(--cjfw-muted)}
.cjfw-lrow .amt{font-weight:800;font-variant-numeric:tabular-nums;text-align:right;font-size:13.5px}
.cjfw-lrow--active{background:color-mix(in srgb,var(--cjfw-pos) 6%,transparent);border-left-color:var(--cjfw-pos)}
.cjfw-lrow--future{opacity:.8}
.cjfw-lrow--past .mon,.cjfw-lrow--past .kind{color:var(--cjfw-muted)}
.cjfw-lrow--past .amt{color:var(--cjfw-text-2);font-weight:700}
.cjfw-ledact{display:inline-flex;gap:2px;align-items:center}
.cjfw-ledact button{width:32px;height:32px;border-radius:8px;border:none;background:transparent;
  color:var(--cjfw-muted);font-size:12px;cursor:pointer;opacity:.45;
  transition:opacity var(--cjfw-fast),background var(--cjfw-fast)}
.cjfw-lrow:hover .cjfw-ledact button,tr:hover .cjfw-ledact button,
.cjfw-ledact button:focus-visible,.cjfw-ledact details[open] button{opacity:1}
.cjfw-ledact button:hover{background:var(--cjfw-surface-3);color:var(--cjfw-text)}
.cjfw-ledact button.del:hover{color:var(--cjfw-neg)}
.cjfw-ledact form{display:inline-flex;margin:0}
.cjfw-ledger__foot{display:flex;align-items:center;gap:12px;padding:12px var(--cjfw-space-5);
  border-top:1px solid var(--cjfw-divider);font-size:12px;color:var(--cjfw-muted);font-variant-numeric:tabular-nums}
.cjfw-pager{margin-left:auto;display:inline-flex;align-items:center;gap:4px}
.cjfw-pager a,.cjfw-pager span.gap{display:inline-grid;place-items:center;min-width:30px;height:30px;
  padding:0 8px;border-radius:8px;border:1px solid var(--cjfw-border);text-decoration:none;
  background:var(--cjfw-surface-2);color:var(--cjfw-text-2);font-size:12px;font-weight:700}
.cjfw-pager span.gap{border-color:transparent;background:transparent}
.cjfw-pager a.is-cur{background:var(--cjfw-accent);color:var(--cjfw-accent-ink);border-color:transparent}
.cjfw-contract{font-size:11.5px;color:var(--cjfw-muted);line-height:1.5;display:flex;align-items:flex-start;gap:8px;
  padding:10px var(--cjfw-space-5);border-top:1px dashed var(--cjfw-border)}
.cjfw-contract i{font-size:10.5px;margin-top:2px;color:var(--cjfw-info)}
/* honest future-truth row (budget card: warehouse auto-populate is PLANNED,
   nothing flows) — the same quiet info voice as .cjfw-contract */
.cjfw-plannedrow2{display:flex;gap:9px;align-items:flex-start;font-size:11.5px;color:var(--cjfw-muted);
  line-height:1.5;padding:10px 14px;margin:0 var(--cjfw-space-5) 14px;border-radius:10px;
  background:var(--cjfw-surface-2);border:1px dashed var(--cjfw-border)}
.cjfw-plannedrow2 i{font-size:10.5px;margin-top:2px;color:var(--cjfw-info)}

/* ---- 6.2 ENTRY / EDIT DISCLOSURES — native <details> (no-JS floor holds for
   open/close); the popover card carries the form so the ledger grid never
   reflows. Writes post their machine address and swap ONLY their section back
   in (LAW 32 — no flash, no reload). ---- */
.cjfw-ledit{position:relative;display:inline-flex}
.cjfw-ledit>summary{list-style:none;cursor:pointer;display:inline-flex}
.cjfw-ledit>summary::-webkit-details-marker{display:none}
/* the pencil summary inside a row's action cluster wears the icon-button coat */
.cjfw-ledact .cjfw-ledit>summary{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;
  color:var(--cjfw-muted);font-size:12px;opacity:.45;
  transition:opacity var(--cjfw-fast),background var(--cjfw-fast)}
.cjfw-lrow:hover .cjfw-ledact .cjfw-ledit>summary,tr:hover .cjfw-ledact .cjfw-ledit>summary,
.cjfw-ledact .cjfw-ledit[open]>summary,.cjfw-ledact .cjfw-ledit>summary:focus-visible{opacity:1}
.cjfw-ledact .cjfw-ledit>summary:hover{background:var(--cjfw-surface-3);color:var(--cjfw-text)}
.cjfw-ledit__pop{position:absolute;right:0;top:calc(100% + 8px);z-index:60;min-width:320px;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius);
  box-shadow:var(--cjfw-shadow);padding:14px;text-align:left}
.cjfw-ledit__pop .cjfw-eyebrow{display:block;margin-bottom:10px}
.cjfw-finform{display:flex;flex-direction:column;gap:9px}
.cjfw-finform .row{display:flex;gap:8px;flex-wrap:wrap}
.cjfw-finform .row .cjfw-input,.cjfw-finform .row .cjfw-select{flex:1;min-width:110px}
.cjfw-finform .foot{display:flex;align-items:center;gap:10px;margin-top:2px}
.cjfw-finform .foot .spacer{flex:1}
.cjfw-finmsg{font-size:12px;color:var(--cjfw-muted)}
.cjfw-finmsg.is-ok{color:var(--cjfw-pos)}
.cjfw-finmsg.is-err{color:var(--cjfw-neg)}
.cjfw-bulkgrid{width:100%;border-collapse:collapse}
.cjfw-bulkgrid td{padding:3px 4px}
.cjfw-bulkgrid .cjfw-input{min-height:32px;padding:2px 9px;font-size:12.5px;width:100%}

/* ---- 6.3 REVENUE SOURCE PILLS + LEAD LINK + ROLL-UP (requirement 3: BOTH
   inputs, source-labeled, one roll-up). The lead-link chip is the Tier B wire
   made visible (value_source='client_reported' -> restate()) — dark behind
   the founder gate. ---- */
.cjfw-src{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:800;
  letter-spacing:.07em;padding:2px 8px;border-radius:var(--cjfw-radius-pill);border:1px solid transparent;white-space:nowrap}
.cjfw-src--admin{color:var(--cjfw-info);background:color-mix(in srgb,var(--cjfw-info) 12%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-info) 30%,transparent)}
.cjfw-src--client{color:color-mix(in srgb,var(--cjfw-brand-plum) 40%,var(--cjfw-text));
  background:color-mix(in srgb,var(--cjfw-brand-plum) 22%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-brand-plum) 45%,transparent)}
.cjfw-src--import{color:var(--cjfw-muted);background:var(--cjfw-surface-2);border-color:var(--cjfw-border)}
.cjfw-leadlink{display:inline-flex;align-items:center;gap:6px;font-family:var(--cjfw-font-mono);
  font-size:10.5px;font-weight:700;color:var(--cjfw-pos);padding:2px 8px;border-radius:var(--cjfw-radius-pill);
  background:color-mix(in srgb,var(--cjfw-pos) 10%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-pos) 28%,transparent);white-space:nowrap}
.cjfw-leadlink--none{color:var(--cjfw-muted);background:transparent;border:1px dashed var(--cjfw-border)}
.cjfw-rollup{display:flex;gap:22px;flex-wrap:wrap;padding:14px var(--cjfw-space-5);
  background:var(--cjfw-bg-2);border-top:1px solid var(--cjfw-divider);font-variant-numeric:tabular-nums}
.cjfw-rollup__cell{min-width:0}
.cjfw-rollup__cell .lbl{display:block;font-size:10px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--cjfw-muted)}
.cjfw-rollup__cell .val{display:block;font-size:15px;font-weight:800;margin-top:2px}
.cjfw-rollup__cell .sub{display:block;font-size:11px;color:var(--cjfw-muted);margin-top:1px}
/* ADMIN annotation line (the cockpit footnote the client never sees) —
   quiet info voice, dashed top rule (mockup §7 idiom). */
.cjfw-finanno{display:flex;gap:9px;align-items:flex-start;padding:10px var(--cjfw-space-5) 12px;
  font-size:11.5px;color:var(--cjfw-muted);line-height:1.5;border-top:1px dashed var(--cjfw-border)}
.cjfw-finanno i{font-size:10.5px;margin-top:2px;color:var(--cjfw-info)}
.cjfw-finanno .tag{font-size:9px;font-weight:800;letter-spacing:.1em;color:var(--cjfw-muted);
  border:1px solid var(--cjfw-border);border-radius:4px;padding:1px 5px;margin-right:2px;flex:0 0 auto;margin-top:1px}

/* ---- 6.4 FINANCIALS CAPABILITY STRIP — ruling 5 made visible: EDIT /
   VIEW-ONLY / NONE per person. The strip STATES which tier is rendering this
   surface; enforcement is server-side (LAW 7 — hiding a button is not
   security; the VIEW render simply has no write affordances in the DOM). ---- */
.cjfw-capstrip{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 16px;margin-bottom:18px;
  border-radius:var(--cjfw-radius);background:var(--cjfw-surface);border:1px solid var(--cjfw-border-soft)}
.cjfw-capstrip__label{font-size:10.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
  color:var(--cjfw-muted);display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.cjfw-capstrip__label i{font-size:11px;color:var(--cjfw-info)}
.cjfw-captier{display:inline-flex;align-items:center;gap:7px;font-size:10.5px;font-weight:800;letter-spacing:.06em;
  padding:4px 11px;border-radius:var(--cjfw-radius-pill);border:1px solid var(--cjfw-border);color:var(--cjfw-muted);
  white-space:nowrap}
.cjfw-captier i{font-size:9.5px}
.cjfw-captier--you{color:var(--cjfw-pos);border-color:color-mix(in srgb,var(--cjfw-pos) 40%,transparent);
  background:color-mix(in srgb,var(--cjfw-pos) 10%,transparent)}
.cjfw-captier--none{border-style:dashed}
.cjfw-capstrip__note{flex:1 1 260px;min-width:0;font-size:11px;color:var(--cjfw-muted);line-height:1.5}

/* ============================================================================
   7. COCKPIT — Mission Control · leads stream + evidence drawer · scope
      selector · time-window picker · wall display class
   Merged from Canvas's cjfw-cockpit-proposed.css (§1–§4 · §6–§8 · §10 · §11 ·
   §13) per the W1 IA-sheet precedent — cockpit-surfaces build, 2026-07-02.
   §0 money tokens, §5 ledger, §9 source pills, and §12 capability strip merged
   earlier with the FINANCIALS build (section 6 above). Every color resolves
   through section-1 tokens, the ratified --cjfw-money-* triplets, or the
   §7.10 wall-class tokens (display-class, deliberately theme-independent).
   Laws: LAW 4 restated patterns · LAW 26/27 display class · LAW 29 floors ·
   LAW 30/31 tokens-only, theme-swap safe · LAW 32/33 four states, no-flash.
   ============================================================================ */

/* ---- 7.1 COCKPIT MASTHEAD — honest count (DNA-11) + the filter sentence
   (B6) + window declaration (B2: every number wears its window). ---- */
.cjfw-cmast{display:flex;flex-direction:column;gap:13px;margin-bottom:20px}
.cjfw-cmast__row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.cjfw-cmast h1{font-size:clamp(20px,2.2vw,25px);font-weight:800;letter-spacing:-.025em}
.cjfw-count{font-size:13px;color:var(--cjfw-text-2);font-variant-numeric:tabular-nums}
.cjfw-count b{color:var(--cjfw-text);font-weight:700}
.cjfw-count .neg{color:var(--cjfw-neg);font-weight:700}
.cjfw-count .warn{color:var(--cjfw-warn);font-weight:700}
.cjfw-fsent{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;color:var(--cjfw-muted)}
.cjfw-ftok{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 13px;
  border-radius:var(--cjfw-radius-pill);font-size:12.5px;font-weight:700;color:var(--cjfw-text);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);cursor:pointer;white-space:nowrap;
  transition:border-color var(--cjfw-fast) var(--cjfw-ease)}
.cjfw-ftok:hover{border-color:color-mix(in srgb,var(--cjfw-accent) 45%,var(--cjfw-border))}
.cjfw-ftok i{font-size:10px;color:var(--cjfw-muted)}
.cjfw-fwin{font-size:11.5px;color:var(--cjfw-muted);font-variant-numeric:tabular-nums;display:inline-flex;align-items:center;gap:7px}

/* ---- 7.2 ATTENTION BAND — only what demands action; each chip jumps to its
   evidence (B15). Empty state says "All quiet." and means it (LAW 33/34). ---- */
.cjfw-attn{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 16px;margin-bottom:22px;
  border-radius:var(--cjfw-radius);background:var(--cjfw-surface);border:1px solid var(--cjfw-border-soft)}
.cjfw-attn__label{font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--cjfw-muted);white-space:nowrap;display:inline-flex;align-items:center;gap:7px}
.cjfw-attnchip{display:inline-flex;align-items:center;gap:9px;min-height:38px;padding:0 13px;
  border-radius:var(--cjfw-radius-pill);font-size:12.5px;font-weight:600;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);cursor:pointer;text-decoration:none;
  transition:background var(--cjfw-fast) var(--cjfw-ease)}
.cjfw-attnchip:hover{background:var(--cjfw-surface-3)}
.cjfw-attnchip b{color:var(--cjfw-text);font-weight:700}
.cjfw-attnchip .sev{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.cjfw-attnchip--neg .sev{background:var(--cjfw-neg)}
.cjfw-attnchip--neg{border-color:color-mix(in srgb,var(--cjfw-neg) 34%,var(--cjfw-border))}
.cjfw-attnchip--warn .sev{background:var(--cjfw-warn)}
.cjfw-attnchip--warn{border-color:color-mix(in srgb,var(--cjfw-warn) 34%,var(--cjfw-border))}
.cjfw-attn--quiet{color:var(--cjfw-muted);font-size:13px;display:flex;align-items:center;gap:9px}
.cjfw-attn--quiet i{color:var(--cjfw-pos)}

/* ---- 7.3 MISSION CONTROL CARD — the leadaudit01 row grammar folded into a
   card (DNA-2): status word → verified/raw → worst signal → money → ops.
   Extends .cjfw-card. Whole-card dim for ended clients (DNA-4). ---- */
.cjfw-mcgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--cjfw-space-5)}
@media(max-width:1220px){.cjfw-mcgrid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.cjfw-mcgrid{grid-template-columns:1fr}}
.cjfw-mc{display:flex;flex-direction:column}
.cjfw-mc__head{display:flex;align-items:center;gap:11px;padding:15px 18px 10px}
.cjfw-mc__tile{width:34px;height:34px;border-radius:9px;flex:0 0 auto;display:grid;place-items:center;
  font-size:12.5px;font-weight:800;color:#fff;background:var(--cjfw-surface-3);border:1px solid var(--cjfw-border)}
.cjfw-mc__name{flex:1;min-width:0;line-height:1.25}
.cjfw-mc__name b{font-size:14.5px;font-weight:700;letter-spacing:-.01em;display:block;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-mc__name span{font-size:11.5px;color:var(--cjfw-muted)}
.cjfw-mc__sig{display:flex;align-items:center;gap:12px;padding:2px 18px 10px;flex-wrap:wrap}
.cjfw-vr{display:flex;align-items:baseline;gap:6px;font-variant-numeric:tabular-nums}
.cjfw-vr__v{font-size:27px;font-weight:800;letter-spacing:-.02em;color:var(--cjfw-pos)}   /* verified dominant (B3) */
.cjfw-vr__r{font-size:12.5px;color:var(--cjfw-muted);font-weight:600}                      /* raw secondary */
.cjfw-vr__lbl{font-size:11px;color:var(--cjfw-muted);font-weight:600}
.cjfw-vr__dark{font-size:12.5px;font-weight:700;color:var(--cjfw-muted)}  /* the honest dark label — never a fake number */
.cjfw-mc__worst{display:flex;align-items:center;gap:8px;margin:0 18px 10px;padding:7px 11px;
  border-radius:9px;font-size:12px;font-weight:600;color:var(--cjfw-neg);
  background:color-mix(in srgb,var(--cjfw-neg) 10%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-neg) 28%,transparent)}
.cjfw-mc__worst--warn{color:var(--cjfw-warn);
  background:color-mix(in srgb,var(--cjfw-warn) 10%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-warn) 28%,transparent)}
.cjfw-mc__worst i{font-size:11px}
.cjfw-mc__money{display:flex;gap:16px;padding:10px 18px;border-top:1px solid var(--cjfw-divider);flex-wrap:wrap}
.cjfw-mny{display:flex;flex-direction:column;gap:1px;min-width:0}
.cjfw-mny .lbl{font-size:10px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--cjfw-muted)}
.cjfw-mny .val{font-size:13.5px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.cjfw-mny .val--none{color:var(--cjfw-muted);font-weight:600}   /* "—" honest absence, never a fake 0 */
.cjfw-mc__ops{display:flex;gap:6px;flex-wrap:wrap;padding:10px 18px;border-top:1px solid var(--cjfw-divider)}
.cjfw-opspill{display:inline-flex;align-items:center;gap:6px;font-size:10.5px;font-weight:700;
  color:var(--cjfw-text-2);background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);
  padding:3px 9px;border-radius:var(--cjfw-radius-pill);white-space:nowrap}
.cjfw-opspill i{font-size:9.5px;color:var(--cjfw-muted)}
.cjfw-opspill--ok i{color:var(--cjfw-pos)}
.cjfw-opspill--warn{color:var(--cjfw-warn);border-color:color-mix(in srgb,var(--cjfw-warn) 32%,transparent)}
.cjfw-opspill--warn i{color:var(--cjfw-warn)}
.cjfw-opspill--fault{color:var(--cjfw-neg);border-color:color-mix(in srgb,var(--cjfw-neg) 32%,transparent);
  background:color-mix(in srgb,var(--cjfw-neg) 9%,transparent)}
.cjfw-opspill--fault i{color:var(--cjfw-neg)}
.cjfw-mc__act{display:flex;align-items:center;gap:12px;padding:12px 18px 14px;border-top:1px solid var(--cjfw-divider);margin-top:auto}
.cjfw-mc__faint{font-size:12px;font-weight:600;color:var(--cjfw-muted);text-decoration:none}
.cjfw-mc__faint:hover{color:var(--cjfw-text-2)}
.cjfw-mc--dim{opacity:.55}
.cjfw-mc--dim:hover{opacity:.8;transition:opacity var(--cjfw-fast) var(--cjfw-ease)}
/* LAW 33 loading: the in-place swap wears a quiet busy veil — no layout shift,
   no spinner theatrics; reduced-motion safe (opacity only). */
[data-cjfw-swap-busy]{opacity:.55;pointer-events:none;transition:opacity var(--cjfw-fast) var(--cjfw-ease)}
/* the in-flow fetch-failure notice (LAW 33 ERROR with recovery) */
.cjfw-swaperr{display:flex;align-items:center;gap:10px;padding:10px 14px;margin-bottom:14px;
  border-radius:var(--cjfw-radius);font-size:12.5px;color:var(--cjfw-neg);
  background:color-mix(in srgb,var(--cjfw-neg) 9%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-neg) 30%,transparent)}
.cjfw-swaperr button{margin-left:auto;background:none;border:1px solid currentColor;border-radius:var(--cjfw-radius-pill);
  color:inherit;font-size:11.5px;font-weight:700;padding:4px 12px;cursor:pointer}

/* ---- 7.4 VERIFIED PAIR BLOCK — the atomic PowerHouse metric (B3): verified
   dominant, raw secondary, delta + window declared (B2). ---- */
.cjfw-vpair{padding:18px var(--cjfw-space-5)}
.cjfw-vpair__lbl{font-size:12px;font-weight:700;color:var(--cjfw-muted);display:flex;align-items:center;gap:8px}
.cjfw-vpair__nums{display:flex;align-items:baseline;gap:9px;margin:7px 0 5px;font-variant-numeric:tabular-nums;flex-wrap:wrap}
.cjfw-vpair__v{font-size:33px;font-weight:800;letter-spacing:-.02em;color:var(--cjfw-pos)}
.cjfw-vpair__r{font-size:14px;color:var(--cjfw-muted);font-weight:600}
.cjfw-vpair__foot{font-size:11.5px;color:var(--cjfw-muted);display:flex;align-items:center;gap:9px;flex-wrap:wrap}

/* ---- 7.5 SYSTEM-WRITTEN SCORECARD (B13) — retires the hand-typed AA widget.
   Every field traces to a ledger, the registry, or fleet telemetry. ---- */
.cjfw-score{position:relative;overflow:hidden}
.cjfw-score::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,var(--cjfw-brand-orange),var(--cjfw-brand-amber))}
.cjfw-score__grid{display:grid;grid-template-columns:1.15fr 1fr .8fr;gap:0}
@media(max-width:1000px){.cjfw-score__grid{grid-template-columns:1fr}}
.cjfw-score__cell{padding:16px var(--cjfw-space-5);border-right:1px solid var(--cjfw-divider);min-width:0}
.cjfw-score__cell:last-child{border-right:none}
@media(max-width:1000px){.cjfw-score__cell{border-right:none;border-bottom:1px solid var(--cjfw-divider)}}
.cjfw-score__prov{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:10px var(--cjfw-space-5);border-top:1px solid var(--cjfw-divider);
  font-size:11.5px;color:var(--cjfw-muted)}
.cjfw-score__prov i{font-size:10.5px}
.cjfw-camp{display:flex;align-items:center;gap:10px;padding:7px 0;font-size:12.5px}
.cjfw-camp b{font-weight:600;color:var(--cjfw-text);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-camp .bud{font-family:var(--cjfw-font-mono);font-size:12px;font-weight:700;white-space:nowrap;color:var(--cjfw-money-spend)}
.cjfw-camp .day{font-size:11px;color:var(--cjfw-muted);white-space:nowrap;font-variant-numeric:tabular-nums}

/* ---- 7.6 MIRROR REGION + ADMIN ANNOTATION LAYER — the client's read models
   in admin chrome; the cockpit footnote the client never sees WRAPS the tile,
   never leaks into it (LAW 35 boundary; S-23 — client house untouched). ---- */
.cjfw-mirror{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--cjfw-space-5)}
@media(max-width:1100px){.cjfw-mirror{grid-template-columns:1fr}}
.cjfw-anno{display:flex;gap:9px;align-items:flex-start;padding:10px 16px 12px;
  font-size:11.5px;color:var(--cjfw-muted);line-height:1.5;border-top:1px dashed var(--cjfw-border)}
.cjfw-anno i{font-size:10.5px;margin-top:2px;color:var(--cjfw-info)}
.cjfw-anno--gap i{color:var(--cjfw-warn)}
.cjfw-anno .tag{font-size:9px;font-weight:800;letter-spacing:.1em;color:var(--cjfw-muted);
  border:1px solid var(--cjfw-border);border-radius:4px;padding:1px 5px;margin-right:2px;flex:0 0 auto;margin-top:1px}

/* ---- 7.7 LEADS STREAM + EVIDENCE DRAWER — the cockpit row grammar (DNA-2);
   a row expands IN PLACE into evidence-left / judgment-right (LAW 32, B8/B9).
   Verdict controls render ONLY inside the drawer, beside evidence
   (ruling 3 — drawer-only, no row-level quick-confirm exists). ---- */
/* 6-column grammar, Dave's 2026-07-11 order: Contact · Client · When · Source ·
   Method · Verdict — plus the row-end journey-arrow gutter (item 6). Track
   MINS re-fit 2026-07-11: the old mins (sum 960px + gaps) already overflowed
   a 1280px viewport's ~907px row box and the new gutter pushed the arrow
   clean off-screen (measured in-browser); these mins total 878px + gaps so
   the whole grammar FITS at 1280, while the fr maxima keep wide screens
   rendering exactly as before. */
.cjfw-lshead,.cjfw-lead{display:grid;align-items:center;gap:14px;
  grid-template-columns:minmax(190px,1.5fr) minmax(130px,1.1fr) minmax(128px,150px) minmax(110px,1fr) minmax(72px,96px) minmax(138px,156px) 26px}
.cjfw-lshead{padding:10px var(--cjfw-space-5);border-bottom:1px solid var(--cjfw-divider);
  font-size:10.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--cjfw-muted)}
.cjfw-lead{padding:12px var(--cjfw-space-5);border-bottom:1px solid var(--cjfw-border-soft);
  font-size:13px;cursor:pointer;border-left:3px solid transparent;transition:background var(--cjfw-fast)}
.cjfw-lead:hover{background:var(--cjfw-surface-2)}
.cjfw-lead:focus-visible{outline:2px solid var(--cjfw-focus);outline-offset:-2px}
.cjfw-lead.is-open{background:var(--cjfw-surface-2);border-left-color:var(--cjfw-accent)}
@media(max-width:1100px){.cjfw-lshead{display:none}.cjfw-lead{grid-template-columns:1fr 1fr;row-gap:8px}}
.cjfw-lead__who{min-width:0;line-height:1.3}
.cjfw-lead__who b{font-size:13.5px;font-weight:700;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-lead__who span{font-size:11.5px;color:var(--cjfw-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.cjfw-lead__client{font-size:12px;font-weight:600;color:var(--cjfw-text-2);display:flex;align-items:center;gap:7px;min-width:0}
.cjfw-lead__client .dot{width:8px;height:8px;border-radius:3px;flex:0 0 auto}
.cjfw-lead__src{display:inline-flex;align-items:center;gap:7px;font-size:11.5px;font-weight:600;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);padding:3px 10px;
  border-radius:var(--cjfw-radius-pill);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;justify-self:start}
.cjfw-lead__src i{font-size:10px;color:var(--cjfw-muted)}
.cjfw-lead__time{font-size:11.5px;color:var(--cjfw-muted);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}

/* fraud chip — no bare numbers (B11): label + score; the dashed pre-scoring
   chip is the fraud_signals-IS-NULL sentinel rendered honestly, never fake-clean */
.cjfw-fraud{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:700;
  padding:3px 10px;border-radius:var(--cjfw-radius-pill);border:1px solid transparent;
  font-variant-numeric:tabular-nums;white-space:nowrap;justify-self:start}
.cjfw-fraud .sc{font-family:var(--cjfw-font-mono);font-size:10.5px;opacity:.8}
.cjfw-fraud--clean{color:var(--cjfw-pos);background:color-mix(in srgb,var(--cjfw-pos) 12%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-pos) 30%,transparent)}
.cjfw-fraud--likely{color:var(--cjfw-warn);background:color-mix(in srgb,var(--cjfw-warn) 13%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-warn) 34%,transparent)}
.cjfw-fraud--bad{color:var(--cjfw-neg);background:color-mix(in srgb,var(--cjfw-neg) 12%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-neg) 30%,transparent)}
.cjfw-fraud--pre{color:var(--cjfw-muted);background:transparent;border:1.5px dashed var(--cjfw-border)}

/* verdict glyph + delivery echo — read in the row (B8 passive tier); echoes
   render the REAL ledger states only, never simulated (LAW 34) */
.cjfw-vstate{display:inline-flex;align-items:center;gap:8px;justify-self:start}
.cjfw-vglyph{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;font-size:11px;flex:0 0 auto}
.cjfw-vglyph--pending{color:var(--cjfw-muted);border:1.5px dashed var(--cjfw-border)}
.cjfw-vglyph--yes{color:var(--cjfw-pos);background:color-mix(in srgb,var(--cjfw-pos) 15%,transparent)}
.cjfw-vglyph--no{color:var(--cjfw-neg);background:color-mix(in srgb,var(--cjfw-neg) 13%,transparent)}
.cjfw-echo{font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:var(--cjfw-radius-pill);
  border:1px solid transparent;white-space:nowrap;letter-spacing:.02em}
.cjfw-echo--none{color:var(--cjfw-muted)}
.cjfw-echo--queued{color:var(--cjfw-info);background:color-mix(in srgb,var(--cjfw-info) 12%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-info) 30%,transparent)}
.cjfw-echo--sent{color:var(--cjfw-pos);background:color-mix(in srgb,var(--cjfw-pos) 12%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-pos) 30%,transparent)}
.cjfw-echo--retracted{color:var(--cjfw-warn);background:color-mix(in srgb,var(--cjfw-warn) 13%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-warn) 34%,transparent)}
.cjfw-echo--withheld{color:var(--cjfw-warn);background:transparent;
  border:1px dashed color-mix(in srgb,var(--cjfw-warn) 40%,var(--cjfw-border))}

/* the drawer — expands in place, evidence left / judgment right. The [hidden]
   rule is load-bearing: display:grid would otherwise defeat the attribute. */
.cjfw-ldrawer{grid-column:1/-1;display:grid;grid-template-columns:1.5fr 1fr;gap:var(--cjfw-space-5);
  padding:18px 4px 8px;cursor:default}
.cjfw-ldrawer[hidden]{display:none}
@media(max-width:1000px){.cjfw-ldrawer{grid-template-columns:1fr}}
.cjfw-evi{display:flex;flex-direction:column;gap:14px;min-width:0}
.cjfw-evi__block{background:var(--cjfw-surface);border:1px solid var(--cjfw-border-soft);
  border-radius:var(--cjfw-radius);padding:14px 16px}
.cjfw-evi__block>.cjfw-eyebrow{display:block;margin-bottom:10px}
.cjfw-subfield{display:grid;grid-template-columns:110px 1fr;gap:4px 14px;font-size:12.5px}
.cjfw-subfield dt{color:var(--cjfw-muted);font-weight:600;padding:3px 0}
.cjfw-subfield dd{color:var(--cjfw-text);padding:3px 0;word-break:break-word}
.cjfw-sig{display:flex;align-items:center;gap:9px;font-size:12px;padding:4px 0;color:var(--cjfw-text-2)}
.cjfw-sig i{font-size:10px;width:14px;text-align:center}
.cjfw-sig--ok i{color:var(--cjfw-pos)}
.cjfw-sig--info i{color:var(--cjfw-info)}
.cjfw-sig .r{margin-left:auto;font-family:var(--cjfw-font-mono);font-size:10.5px;color:var(--cjfw-muted)}

/* journey strip (B10) — COLLECT → RESOLVE → VERIFY → DELIVER */
.cjfw-jstrip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
@media(max-width:900px){.cjfw-jstrip{grid-template-columns:repeat(2,1fr)}}
.cjfw-jstage{padding:10px 12px;border-radius:10px;background:var(--cjfw-surface);
  border:1px solid var(--cjfw-border-soft);min-width:0}
.cjfw-jstage__t{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:800;
  letter-spacing:.1em;text-transform:uppercase;color:var(--cjfw-muted);margin-bottom:5px}
.cjfw-jstage__t i{font-size:10px}
.cjfw-jstage p{font-size:11.5px;color:var(--cjfw-text-2);line-height:1.45}
.cjfw-jstage--done{border-color:color-mix(in srgb,var(--cjfw-pos) 30%,var(--cjfw-border-soft))}
.cjfw-jstage--done .cjfw-jstage__t{color:var(--cjfw-pos)}
.cjfw-jstage--now{border-color:color-mix(in srgb,var(--cjfw-accent) 45%,var(--cjfw-border-soft))}
.cjfw-jstage--now .cjfw-jstage__t{color:var(--cjfw-accent)}
.cjfw-jstage--wait{border-style:dashed;opacity:.75}

/* the judgment column — wraps the EXISTING L3 verdict block (one write path,
   one JS module); sticky so evidence scrolls beside a fixed judgment */
.cjfw-ldrawer__judge{display:flex;flex-direction:column;gap:12px;align-self:start;position:sticky;top:84px;min-width:0}
.cjfw-valuebox{display:flex;align-items:flex-start;gap:10px;padding:11px 13px;border-radius:10px;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);font-size:12px;
  color:var(--cjfw-text-2);line-height:1.5}
.cjfw-valuebox i{color:var(--cjfw-muted);margin-top:2px;font-size:11px}
.cjfw-kbdhint{display:inline-flex;align-items:center;gap:9px;font-size:11.5px;color:var(--cjfw-muted)}
.cjfw-kbdhint kbd{font-family:var(--cjfw-font-mono);font-size:10.5px;color:var(--cjfw-text-2);
  border:1px solid var(--cjfw-border);border-radius:5px;padding:1px 6px;background:var(--cjfw-surface-2)}

/* ---- 7.7b LEADS-ADMIN v2 (Dave 2026-07-09, Canvas REV 3) — the 6-column
   grammar's new cells + the server-side search/sort toolbar. Additive; the
   drawer + verdict block above are untouched. ---- */

/* sortable / plain headers */
.cjfw-lshead2{display:flex;align-items:center;min-width:0}
.cjfw-headplain{font:inherit;color:var(--cjfw-muted)}
.cjfw-sortbtn{display:inline-flex;align-items:center;gap:5px;color:var(--cjfw-muted);
  font:inherit;text-decoration:none;cursor:pointer}
.cjfw-sortbtn:hover{color:var(--cjfw-text-2)}
.cjfw-sortbtn.is-active{color:var(--cjfw-accent)}
.cjfw-sortcaret{width:9px;height:9px;opacity:.35;transition:opacity var(--cjfw-fast) var(--cjfw-ease),transform var(--cjfw-fast) var(--cjfw-ease)}
.cjfw-sortbtn.is-active .cjfw-sortcaret{opacity:1}
.cjfw-sortbtn.is-desc .cjfw-sortcaret{transform:rotate(180deg)}

/* CONTACT — stacked name / phone / email (CallRail-style). DISPLAY-ONLY text
   since 2026-07-11 (Dave): no tel:/mailto: anchors, no link affordances. */
.cjfw-contact{display:flex;flex-direction:column;gap:2px;min-width:0}
.cjfw-contact b{font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cjfw-text)}
.cjfw-contactline{font-size:11px;color:var(--cjfw-muted);display:flex;align-items:center;gap:5px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.cjfw-contactline svg{width:10px;height:10px;flex:0 0 auto;opacity:.7}
.cjfw-contactline.is-empty{font-style:italic}

/* ROW-END JOURNEY ARROW (Dave 2026-07-11, CallRail-style item 6): quiet until
   the row is hovered/focused; its own hover/focus ring; never a row-expand
   target (it is an <a> — the delegated row handler ignores anchors). */
.cjfw-leadgo{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;
  color:var(--cjfw-muted);font-size:12px;text-decoration:none;justify-self:end;
  transition:background var(--cjfw-fast),color var(--cjfw-fast)}
.cjfw-lead:hover .cjfw-leadgo,.cjfw-lead.is-open .cjfw-leadgo{color:var(--cjfw-text-2)}
.cjfw-leadgo:hover{color:var(--cjfw-accent);background:color-mix(in srgb,var(--cjfw-accent) 14%,transparent)}
.cjfw-leadgo:focus-visible{outline:2px solid var(--cjfw-focus);outline-offset:1px;color:var(--cjfw-accent)}

/* WHEN — LEFT-aligned (Dave), per-row client-local time */
.cjfw-when{display:flex;flex-direction:column;gap:1px;text-align:left;min-width:0}
.cjfw-when b{font-size:12px;font-weight:600;white-space:nowrap;color:var(--cjfw-text-2)}
.cjfw-when span{font-size:10px;color:var(--cjfw-muted);white-space:nowrap}

/* SOURCE — the NAME itself as a colored pill (Lead-Audit srcC, verbatim); no dot.
   Each --<slug> carries srcC()'s exact background/color pair. Unmapped channels
   (SearchGPT, "Google search", …) fall to the honest neutral pill. */
.cjfw-srcpill{display:inline-flex;align-items:center;max-width:100%;justify-self:start;
  font-size:11.5px;font-weight:700;line-height:1.4;padding:2px 10px;border-radius:var(--cjfw-radius-pill)}
.cjfw-srcpill span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-srcpill--unmapped{background:color-mix(in srgb,var(--cjfw-muted) 12%,transparent);color:var(--cjfw-muted)}
.cjfw-srcpill--bing{background:rgba(0,137,123,.14);color:#00897b}
.cjfw-srcpill--bing-ads{background:rgba(255,165,2,.14);color:#ffa502}
.cjfw-srcpill--brave{background:rgba(251,84,43,.14);color:#fb542b}
.cjfw-srcpill--chatgpt{background:rgba(16,163,127,.14);color:#10a37f}
.cjfw-srcpill--direct{background:rgba(46,213,115,.14);color:#2ed573}
.cjfw-srcpill--duckduckgo{background:rgba(222,88,51,.14);color:#de5833}
.cjfw-srcpill--facebook{background:rgba(108,92,231,.14);color:#6c5ce7}
.cjfw-srcpill--facebook-ads{background:rgba(66,103,178,.14);color:#4267b2}
.cjfw-srcpill--gemini{background:rgba(66,133,244,.14);color:#4285f4}
.cjfw-srcpill--google{background:rgba(52,172,224,.14);color:#34ace0}
.cjfw-srcpill--google-ads{background:rgba(74,124,255,.14);color:#6ba0ff}
.cjfw-srcpill--google-jobs{background:rgba(66,133,244,.14);color:#4285f4}
.cjfw-srcpill--google-lsa{background:rgba(15,157,88,.14);color:#0f9d58}
.cjfw-srcpill--instagram{background:rgba(225,48,108,.14);color:#e1306c}
.cjfw-srcpill--linkedin{background:rgba(10,102,194,.14);color:#0a66c2}
.cjfw-srcpill--linkedin-ads{background:rgba(10,102,194,.2);color:#0a66c2}
.cjfw-srcpill--organic{background:rgba(129,199,132,.14);color:#81c784}
.cjfw-srcpill--referral{background:rgba(255,183,77,.14);color:#ffb74d}
.cjfw-srcpill--website{background:rgba(77,182,172,.14);color:#4db6ac}
.cjfw-srcpill--yahoo{background:rgba(118,76,163,.14);color:#764ca3}
.cjfw-srcpill--yelp{background:rgba(211,35,35,.14);color:#d32323}
.cjfw-srcpill--main{background:rgba(158,158,158,.14);color:#9e9e9e}
.cjfw-srcpill--unknown{background:rgba(120,120,128,.1);color:#787880}

/* METHOD — honest single value today (Gap 4) */
.cjfw-method{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:var(--cjfw-text-2)}
.cjfw-method svg{width:12px;height:12px;color:var(--cjfw-muted);flex:0 0 auto}

/* VOLUME-CHART HOVER (Dave 2026-07-11): fine dotted vertical guide centered
   over the hovered bar + a tooltip with that bar's date and count. The wrap
   is the tooltip's positioning context; the guide is an SVG line the JS moves. */
.cjfw-volchart__wrap{position:relative}
.cjfw-volchart__wrap svg{display:block;cursor:crosshair}
.cjfw-volguide{stroke:var(--cjfw-text-2);stroke-width:1;stroke-dasharray:1 3;
  opacity:.8;pointer-events:none;vector-effect:non-scaling-stroke}
.cjfw-volguide[hidden]{display:none}
.cjfw-voltip{position:absolute;z-index:5;pointer-events:none;white-space:nowrap;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);
  border-radius:8px;box-shadow:var(--cjfw-shadow-2,0 4px 14px rgba(0,0,0,.18));
  padding:5px 10px;font-size:11.5px;color:var(--cjfw-text-2);
  transform:translate(-50%,-100%)}
.cjfw-voltip b{color:var(--cjfw-text);font-variant-numeric:tabular-nums}
.cjfw-voltip[hidden]{display:none}

/* VERDICT cell v2 — fraud risk-dot folded in ahead of the glyph + echo */
.cjfw-vstate2{display:inline-flex;align-items:center;gap:7px;justify-self:start;min-width:0}
.cjfw-riskdot{width:7px;height:7px;border-radius:50%;flex:0 0 auto}
.cjfw-riskdot--clean{background:var(--cjfw-pos)}
.cjfw-riskdot--likely{background:var(--cjfw-warn)}
.cjfw-riskdot--bad{background:var(--cjfw-neg)}
.cjfw-riskdot--pre{border:1.5px dashed var(--cjfw-muted);background:transparent}

/* "What they submitted" — NEW drawer section (message front-and-center) */
.cjfw-submsg{background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);border-radius:var(--cjfw-radius);
  padding:12px 14px;margin-bottom:12px}
.cjfw-submsg__label{display:flex;align-items:center;gap:7px;font-size:10.5px;font-weight:800;letter-spacing:.05em;
  text-transform:uppercase;color:var(--cjfw-muted);margin-bottom:6px}
.cjfw-submsg__body{font-size:13.5px;line-height:1.5;color:var(--cjfw-text);font-style:italic;margin:0;word-break:break-word}
.cjfw-submsg__body.is-empty{color:var(--cjfw-muted)}
.cjfw-submitted .cjfw-subfield{margin-top:2px}
.cjfw-submitted dd.is-empty{color:var(--cjfw-muted);font-style:italic}
.cjfw-subnote{display:flex;align-items:flex-start;gap:7px;font-size:11px;color:var(--cjfw-muted);
  margin-top:10px;padding-top:10px;border-top:1px dashed var(--cjfw-border-soft)}
.cjfw-subnote i{margin-top:1px;flex:0 0 auto}

/* TOOLBAR — server-side search + reviewed progress (sits above #cjfw-ls-body) */
.cjfw-lstoolbar{display:flex;align-items:center;gap:16px;margin-bottom:14px;flex-wrap:wrap}
.cjfw-lsearch-form{flex:0 0 auto;margin:0}
.cjfw-lsearch{display:flex;align-items:center;gap:8px;width:320px;max-width:100%;
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius-sm);padding:8px 12px}
.cjfw-lsearch:focus-within{border-color:var(--cjfw-accent);box-shadow:var(--cjfw-focus-ring)}
.cjfw-lsearch svg{width:14px;height:14px;color:var(--cjfw-muted);flex:0 0 auto}
.cjfw-lsearch input{flex:1;min-width:0;background:none;border:0;color:var(--cjfw-text);font:inherit;font-size:13px;outline:none}
.cjfw-lsearch input::placeholder{color:var(--cjfw-muted)}
.cjfw-progress{display:inline-flex;align-items:center;gap:9px;font-size:12px;color:var(--cjfw-text-2);margin-left:auto}
.cjfw-progress b{color:var(--cjfw-text)}
.cjfw-progress__bar{width:88px;height:6px;border-radius:3px;background:var(--cjfw-surface-3,var(--cjfw-surface-2));overflow:hidden}
.cjfw-progress__fill{height:100%;background:var(--cjfw-accent);border-radius:3px;transition:width var(--cjfw-fast) var(--cjfw-ease)}
@media(max-width:640px){.cjfw-progress{margin-left:0}}

/* ---- 7.8 CLIENT-SCOPE SELECTOR — the callrail04/05 requirement restated as
   OUR pattern (LAW 4): masthead pill → searchable multi-select → Select all /
   Clear / per-company check-square rows with client color dots → Apply.
   Grant boundary stated ON the surface (S-20: the list OFFERS only granted
   companies; the selector filters within them). Nothing rescopes until Apply;
   Apply re-renders every surface beneath in place (LAW 32). ---- */
.cjfw-scope{position:relative;display:inline-flex}
.cjfw-scopepill{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 13px;
  border-radius:var(--cjfw-radius-pill);font-size:12.5px;font-weight:700;color:var(--cjfw-text);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);cursor:pointer;white-space:nowrap;
  transition:border-color var(--cjfw-fast) var(--cjfw-ease)}
.cjfw-scopepill:hover{border-color:color-mix(in srgb,var(--cjfw-accent) 45%,var(--cjfw-border))}
.cjfw-scopepill>i{font-size:11px;color:var(--cjfw-muted)}
.cjfw-scopepill .chev{font-size:10px;color:var(--cjfw-muted)}
.cjfw-scopepill .ct{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;
  border-radius:var(--cjfw-radius-pill);font-size:10.5px;font-weight:800;
  background:color-mix(in srgb,var(--cjfw-accent) 18%,transparent);color:var(--cjfw-accent)}
.cjfw-scopepill .ct[hidden]{display:none}
.cjfw-scopepill--scoped{border-color:color-mix(in srgb,var(--cjfw-accent) 55%,var(--cjfw-border))}
.cjfw-scope.is-open .cjfw-scopepill{border-color:color-mix(in srgb,var(--cjfw-accent) 55%,var(--cjfw-border))}
.cjfw-scopepanel{position:absolute;top:calc(100% + 8px);left:0;z-index:70;width:322px;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius-lg);
  box-shadow:var(--cjfw-shadow);display:none;flex-direction:column;overflow:hidden}
.cjfw-scope.is-open .cjfw-scopepanel{display:flex}
.cjfw-scopepanel__top{padding:12px 14px 0}
.cjfw-scopepanel__top .cjfw-minisearch{width:100%;min-width:0}
.cjfw-scopepanel__ctl{display:flex;align-items:center;gap:14px;padding:10px 16px 8px;font-size:12px}
.cjfw-scopepanel__ctl button{background:none;border:none;padding:0;font-size:12px;font-weight:700;
  color:var(--cjfw-info);cursor:pointer}
.cjfw-scopepanel__ctl button:hover{text-decoration:underline}
.cjfw-scopepanel__ctl .n{margin-left:auto;color:var(--cjfw-muted);font-variant-numeric:tabular-nums;font-weight:600}
.cjfw-scopelist{max-height:308px;overflow-y:auto;border-top:1px solid var(--cjfw-border-soft)}
.cjfw-scoperow{display:flex;align-items:center;gap:11px;width:100%;padding:9px 16px;text-align:left;
  background:none;border:none;border-bottom:1px solid var(--cjfw-border-soft);cursor:pointer;
  font-size:13px;font-weight:600;color:var(--cjfw-text-2);transition:background var(--cjfw-fast)}
.cjfw-scoperow:last-child{border-bottom:none}
.cjfw-scoperow:hover{background:var(--cjfw-surface-2)}
.cjfw-scoperow .ck{width:18px;height:18px;flex:0 0 auto;display:grid;place-items:center;font-size:10px;
  border-radius:5px;border:1.5px solid var(--cjfw-border);color:transparent;background:transparent;
  transition:background var(--cjfw-fast),border-color var(--cjfw-fast)}
.cjfw-scoperow .dot{width:8px;height:8px;border-radius:3px;flex:0 0 auto}
.cjfw-scoperow .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-scoperow.is-on{background:color-mix(in srgb,var(--cjfw-accent) 7%,transparent);color:var(--cjfw-text)}
.cjfw-scoperow.is-on:hover{background:color-mix(in srgb,var(--cjfw-accent) 11%,transparent)}
.cjfw-scoperow.is-on .ck{background:var(--cjfw-accent);border-color:var(--cjfw-accent);color:var(--cjfw-accent-ink)}
.cjfw-scoperow--ended{opacity:.55}
.cjfw-scoperow--ended .end{font-size:9.5px;font-weight:800;letter-spacing:.08em;color:var(--cjfw-neg);
  border:1px solid color-mix(in srgb,var(--cjfw-neg) 40%,transparent);border-radius:4px;padding:1px 5px;flex:0 0 auto}
.cjfw-scopepanel__grant{display:flex;gap:8px;align-items:flex-start;padding:9px 16px;font-size:11px;
  color:var(--cjfw-muted);line-height:1.5;border-top:1px dashed var(--cjfw-border)}
.cjfw-scopepanel__grant i{font-size:10px;margin-top:2px;color:var(--cjfw-info)}
.cjfw-scopepanel__foot{padding:10px 14px 13px;border-top:1px solid var(--cjfw-divider)}
.cjfw-scopepanel__foot .cjfw-btn{width:100%;justify-content:center}
.cjfw-scopepanel__foot .hint{display:block;text-align:center;font-size:10.5px;color:var(--cjfw-muted);margin-top:7px}
/* the honest fallback notice — a saved scope that no longer matches grants */
.cjfw-scopenotice{display:flex;align-items:center;gap:9px;padding:9px 14px;margin-bottom:14px;
  border-radius:var(--cjfw-radius);font-size:12px;color:var(--cjfw-text-2);
  background:color-mix(in srgb,var(--cjfw-info) 8%,transparent);
  border:1px solid color-mix(in srgb,var(--cjfw-info) 28%,transparent)}
.cjfw-scopenotice i{color:var(--cjfw-info);font-size:11px}

/* ---- 7.9 TIME-WINDOW PICKER — ruling 2 in full: presets in the locked order,
   each wearing its resolved dates (B2 holds inside the menu); Custom start /
   finish pickers wake when Custom is chosen; Compare = prior period / prior
   year / off; STICKY per user (opens on the last pick and says so). The
   .cjfw-cmp pair is how compare renders on any number: current · prior wearing
   its window · delta chip. One grammar, every surface. ---- */
.cjfw-win{position:relative;display:inline-flex}
.cjfw-winpanel{position:absolute;top:calc(100% + 8px);left:0;z-index:70;width:560px;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius-lg);
  box-shadow:var(--cjfw-shadow);overflow:hidden;display:none}
.cjfw-win.is-open .cjfw-winpanel{display:block}
@media(max-width:700px){.cjfw-winpanel{width:min(92vw,560px)}}
.cjfw-winpanel__grid{display:grid;grid-template-columns:236px 1fr}
@media(max-width:700px){.cjfw-winpanel__grid{grid-template-columns:1fr}}
.cjfw-winlist{border-right:1px solid var(--cjfw-border-soft);padding:8px 0;max-height:392px;overflow-y:auto}
@media(max-width:700px){.cjfw-winlist{border-right:none;border-bottom:1px solid var(--cjfw-border-soft)}}
.cjfw-winopt{display:flex;align-items:center;gap:10px;width:100%;padding:8px 16px;text-align:left;
  background:none;border:none;cursor:pointer;font-size:12.5px;font-weight:600;color:var(--cjfw-text-2);
  transition:background var(--cjfw-fast)}
.cjfw-winopt:hover{background:var(--cjfw-surface-2)}
.cjfw-winopt .rd{width:15px;height:15px;flex:0 0 auto;border-radius:50%;border:1.5px solid var(--cjfw-border);
  display:grid;place-items:center}
.cjfw-winopt .rd::after{content:"";width:7px;height:7px;border-radius:50%;background:transparent}
.cjfw-winopt.is-cur{color:var(--cjfw-text);background:color-mix(in srgb,var(--cjfw-accent) 7%,transparent)}
.cjfw-winopt.is-cur .rd{border-color:var(--cjfw-accent)}
.cjfw-winopt.is-cur .rd::after{background:var(--cjfw-accent)}
.cjfw-winopt .lbl{flex:1;min-width:0}
.cjfw-winopt .lbl small{display:block;font-size:10.5px;font-weight:600;color:var(--cjfw-muted)}
.cjfw-winopt .dates{font-size:10.5px;color:var(--cjfw-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.cjfw-winside{padding:14px 16px;display:flex;flex-direction:column;gap:14px}
.cjfw-winside .cjfw-eyebrow{display:block;margin-bottom:8px}
.cjfw-windate{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.cjfw-windate label{font-size:10.5px;font-weight:700;color:var(--cjfw-muted);width:44px;flex:0 0 auto}
.cjfw-windate .cjfw-select{min-height:34px;padding:2px 9px;font-size:12.5px;width:auto}
.cjfw-wincustom.is-inert{opacity:.5;pointer-events:none}
.cjfw-wincustom .note{font-size:10.5px;color:var(--cjfw-muted);line-height:1.5}
.cjfw-winsticky{display:flex;gap:8px;align-items:flex-start;font-size:11px;color:var(--cjfw-muted);
  line-height:1.5;padding-top:12px;border-top:1px dashed var(--cjfw-border)}
.cjfw-winsticky i{font-size:10px;margin-top:2px;color:var(--cjfw-info)}
.cjfw-winpanel__foot{display:flex;align-items:center;gap:10px;padding:11px 16px;border-top:1px solid var(--cjfw-divider)}
.cjfw-winpanel__foot .resolved{font-size:11px;color:var(--cjfw-muted);font-variant-numeric:tabular-nums}
.cjfw-winpanel__foot .cjfw-btn{margin-left:auto}
.cjfw-cmpseg{display:inline-flex;background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border);
  border-radius:var(--cjfw-radius-pill);padding:3px;gap:2px}
.cjfw-cmpseg button{height:28px;padding:0 12px;border:none;background:transparent;border-radius:var(--cjfw-radius-pill);
  font-size:11.5px;font-weight:700;color:var(--cjfw-muted);cursor:pointer;white-space:nowrap}
.cjfw-cmpseg button.is-active{background:var(--cjfw-accent);color:var(--cjfw-accent-ink)}
.cjfw-cmpprev{font-size:11px;color:var(--cjfw-muted);margin-top:8px;font-variant-numeric:tabular-nums}
.cjfw-cmp{display:inline-flex;align-items:baseline;gap:9px;font-variant-numeric:tabular-nums;white-space:nowrap}
.cjfw-cmp__now{font-size:21px;font-weight:800;letter-spacing:-.02em;color:var(--cjfw-text)}
.cjfw-cmp__vs{font-size:10.5px;font-weight:700;color:var(--cjfw-muted);letter-spacing:.06em;text-transform:uppercase}
.cjfw-cmp__prior{font-size:14px;font-weight:700;color:var(--cjfw-muted)}
.cjfw-cmp__prior .win{font-size:10.5px;font-weight:600;margin-left:4px}

/* ---- 7.10 WALL DISPLAY CLASS — ruling 4 (LAW 26 display class; LAW 27
   exception: top strip, no rail). Status words + worst signals dominate;
   NOTHING implies interaction. Wall tokens are deliberately theme-independent
   fixed values: a TV canvas doesn't follow a user theme, and every status
   color clears >=6:1 on this canvas (stock --cjfw-neg reads 3.7:1 — fine at
   arm's length, invisible across a room). Ink is pinned for the same reason
   (a light user theme must never put dark text on the dark wall). ---- */
.cjfw-wall{
  --cjfw-wall-bg:#07090d;
  --cjfw-wall-surface:#10141c;
  --cjfw-wall-border:#232b3a;
  --cjfw-wall-ink:#e8ecf4;      /* pinned — display class never follows the user theme */
  --cjfw-wall-pos:#2fc57f;      /* 8.9:1 on the wall canvas */
  --cjfw-wall-warn:#f0a02c;     /* 9.3:1 */
  --cjfw-wall-neg:#ff5a4e;      /* 6.5:1 */
  --cjfw-wall-muted:#8b95a8;
  background:var(--cjfw-wall-bg);min-height:100vh;color:var(--cjfw-wall-ink);
  font-family:var(--cjfw-font-sans)}
.cjfw-wall *{cursor:default!important}
.cjfw-wall__screen{min-height:100vh;display:flex;flex-direction:column}  /* the TV frame — one screen at 1920x1080 */
.cjfw-wallbar{display:flex;align-items:center;gap:22px;padding:18px 34px;
  border-bottom:1px solid var(--cjfw-wall-border)}
.cjfw-wallbar__title{font-size:19px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.cjfw-wallbar__title small{display:block;font-size:10.5px;font-weight:700;letter-spacing:.2em;color:var(--cjfw-wall-muted)}
.cjfw-wallbar__win{font-size:15px;font-weight:700;color:var(--cjfw-wall-muted);letter-spacing:.08em;
  font-variant-numeric:tabular-nums;text-transform:uppercase}
.cjfw-wallbar__clock{margin-left:auto;font-size:26px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:.02em}
.cjfw-wallbar__clock small{font-size:14px;font-weight:700;color:var(--cjfw-wall-muted)}
.cjfw-wallbar__pill{font-size:11px;font-weight:800;letter-spacing:.14em;padding:6px 14px;text-transform:uppercase;
  border-radius:var(--cjfw-radius-pill);border:1px solid var(--cjfw-wall-border);color:var(--cjfw-wall-muted)}
/* the honest refresh banner (critique fix 4) — a failed/401 poll surfaces
   within ONE interval; the wall NEVER keeps painting yesterday's GOOD */
.cjfw-wall-banner{display:flex;align-items:center;gap:14px;padding:12px 34px;
  font-size:16px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  color:var(--cjfw-wall-neg);background:color-mix(in srgb,var(--cjfw-wall-neg) 14%,transparent);
  border-bottom:2px solid var(--cjfw-wall-neg)}
.cjfw-wall-banner[hidden]{display:none}
.cjfw-wallattn{display:flex;align-items:stretch;gap:14px;padding:16px 34px 0}
.cjfw-wallattn__count{flex:0 0 auto;display:flex;flex-direction:column;justify-content:center;padding:0 26px;
  border-radius:14px;background:color-mix(in srgb,var(--cjfw-wall-neg) 14%,transparent);
  border:2px solid color-mix(in srgb,var(--cjfw-wall-neg) 55%,transparent);text-align:center}
.cjfw-wallattn__count b{font-size:44px;font-weight:800;line-height:1;color:var(--cjfw-wall-neg)}
.cjfw-wallattn__count span{font-size:10.5px;font-weight:800;letter-spacing:.16em;color:var(--cjfw-wall-neg);text-transform:uppercase}
.cjfw-wallattn__count--quiet{background:color-mix(in srgb,var(--cjfw-wall-pos) 10%,transparent);
  border-color:color-mix(in srgb,var(--cjfw-wall-pos) 45%,transparent)}
.cjfw-wallattn__count--quiet b,.cjfw-wallattn__count--quiet span{color:var(--cjfw-wall-pos)}
.cjfw-wallattn__items{flex:1;display:flex;flex-direction:column;gap:8px;justify-content:center;min-width:0}
.cjfw-wallattn__item{display:flex;align-items:center;gap:14px;font-size:21px;font-weight:800;letter-spacing:-.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cjfw-wallattn__item .dot{width:13px;height:13px;border-radius:50%;flex:0 0 auto}
.cjfw-wallattn__item.neg .dot{background:var(--cjfw-wall-neg)}
.cjfw-wallattn__item.neg{color:var(--cjfw-wall-neg)}
.cjfw-wallattn__item.warn .dot{background:var(--cjfw-wall-warn)}
.cjfw-wallattn__item.warn{color:var(--cjfw-wall-warn)}
.cjfw-wallattn__item.quiet .dot{background:var(--cjfw-wall-pos)}
.cjfw-wallattn__item.quiet{color:var(--cjfw-wall-pos)}
.cjfw-wallattn__item small{font-size:14px;font-weight:700;color:var(--cjfw-wall-muted);letter-spacing:0}
.cjfw-wallgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;padding:16px 34px;flex:1;align-content:stretch}
@media(max-width:1500px){.cjfw-wallgrid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:1100px){.cjfw-wallgrid{grid-template-columns:repeat(2,1fr)}}
.cjfw-walltile{display:flex;flex-direction:column;gap:6px;padding:18px 20px;border-radius:14px;
  background:var(--cjfw-wall-surface);border:1px solid var(--cjfw-wall-border);min-width:0}
.cjfw-walltile__status{font-size:24px;font-weight:800;letter-spacing:.1em}
.cjfw-walltile--neg{border-color:color-mix(in srgb,var(--cjfw-wall-neg) 60%,transparent);
  background:color-mix(in srgb,var(--cjfw-wall-neg) 8%,var(--cjfw-wall-surface))}
.cjfw-walltile--neg .cjfw-walltile__status{color:var(--cjfw-wall-neg)}
.cjfw-walltile--warn{border-color:color-mix(in srgb,var(--cjfw-wall-warn) 50%,transparent);
  background:color-mix(in srgb,var(--cjfw-wall-warn) 6%,var(--cjfw-wall-surface))}
.cjfw-walltile--warn .cjfw-walltile__status{color:var(--cjfw-wall-warn)}
.cjfw-walltile--pos .cjfw-walltile__status{color:var(--cjfw-wall-pos)}
.cjfw-walltile--dim{opacity:.45}
.cjfw-walltile--dim .cjfw-walltile__status{color:var(--cjfw-wall-muted)}
.cjfw-walltile__name{font-size:16px;font-weight:700;letter-spacing:-.01em;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.cjfw-walltile__nums{display:flex;align-items:baseline;gap:8px;font-variant-numeric:tabular-nums;margin-top:auto}
.cjfw-walltile__nums b{font-size:38px;font-weight:800;letter-spacing:-.02em;line-height:1}
.cjfw-walltile__nums span{font-size:14px;font-weight:700;color:var(--cjfw-wall-muted)}
.cjfw-walltile__nums .dark{font-size:15px;font-weight:800;color:var(--cjfw-wall-muted);letter-spacing:.02em}
.cjfw-walltile__worst{font-size:13.5px;font-weight:700;line-height:1.35;min-height:2.7em}
.cjfw-walltile--neg .cjfw-walltile__worst{color:var(--cjfw-wall-neg)}
.cjfw-walltile--warn .cjfw-walltile__worst{color:var(--cjfw-wall-warn)}
.cjfw-walltile--pos .cjfw-walltile__worst{color:var(--cjfw-wall-muted);font-weight:600}
.cjfw-wallfoot{display:flex;align-items:center;gap:26px;padding:14px 34px 20px;flex-wrap:wrap;
  border-top:1px solid var(--cjfw-wall-border);font-size:13px;font-weight:700;letter-spacing:.1em;
  color:var(--cjfw-wall-muted);text-transform:uppercase;font-variant-numeric:tabular-nums}
.cjfw-wallfoot .live{display:inline-flex;align-items:center;gap:8px;margin-left:auto}
.cjfw-wallfoot .live .dot{width:9px;height:9px;border-radius:50%;background:var(--cjfw-wall-pos)}

/* ============================================================================
   BUSINESS RECORD REDESIGN (Canvas business-record-redesign-2026-07) — the
   record-health header + the two-column record grid. Tokens-only (no hardcoded
   colors → per-theme correct automatically). --info blue, never amber: amber is
   quarantined to the view-as masthead button (S-24). The completeness ring is a
   CSS conic (namespaced .cjfw-rechealth__ring so it never collides with the SVG
   donut .cjfw-ring/.cjfw-ring__val used elsewhere).
   ============================================================================ */
.cjfw-rechealth{display:flex;align-items:center;gap:20px;flex-wrap:wrap;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);border-radius:var(--cjfw-radius);
  padding:16px 18px;margin-bottom:22px}
.cjfw-rechealth__meter{display:flex;align-items:center;gap:14px;flex:0 0 auto}
.cjfw-rechealth__ring{--pct:0;width:56px;height:56px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;
  background:conic-gradient(var(--cjfw-info) calc(var(--pct)*1%),var(--cjfw-surface-3) 0);position:relative}
.cjfw-rechealth__ring::after{content:"";position:absolute;inset:6px;border-radius:50%;background:var(--cjfw-surface)}
.cjfw-rechealth__ring b{position:relative;z-index:1;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums}
.cjfw-rechealth__ring--done{background:conic-gradient(var(--cjfw-pos) 100%,var(--cjfw-pos) 0)}
.cjfw-rechealth__lbl b{display:block;font-size:14px;font-weight:700}
.cjfw-rechealth__lbl span{font-size:12px;color:var(--cjfw-muted)}
.cjfw-rechealth__gaps{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:1;min-width:220px}
.cjfw-rechealth__gaps .glabel{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--cjfw-muted)}
.cjfw-gapchip{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-2);border:1px solid color-mix(in srgb,var(--cjfw-info) 30%,var(--cjfw-border));
  border-radius:var(--cjfw-radius-pill);padding:5px 11px;text-decoration:none;transition:background var(--cjfw-fast)}
.cjfw-gapchip:hover{background:var(--cjfw-surface-3)}
.cjfw-gapchip i{font-size:10px;color:var(--cjfw-info)}
.cjfw-rechealth__done{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--cjfw-pos);font-weight:600}

/* The record grid — related sections pair side by side; the spine (identity)
   and the full-width feet (activity) span both columns; collapses to one
   column under 1080px so the swap targets stack cleanly on narrow viewports. */
.cjfw-recgrid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
.cjfw-recgrid > .span2{grid-column:1 / -1}
@media (max-width:1080px){.cjfw-recgrid{grid-template-columns:1fr}}
/* the money-boundary pointer inside the billing card (coins + Financials link) */
.cjfw-finpointer{display:flex;align-items:flex-start;gap:9px;font-size:12px;color:var(--cjfw-text-2);
  background:var(--cjfw-surface-2);border:1px solid var(--cjfw-border-soft);border-radius:var(--cjfw-radius-sm);
  padding:10px 12px;margin-top:6px;line-height:1.45}
.cjfw-finpointer i{color:var(--cjfw-muted);margin-top:1px}

/* ============================================================================
   MODAL / DIALOG PRIMITIVE  (Canvas — modal-primitive-2026-07)
   ONE reusable popup used anywhere on PowerHouse — no per-page recreation.
   Consolidates the two hand-built systems that drifted apart before this:
     · .cjfw-modal (integrations kill/regen/reveal) — inline display:none + a
       JS display:flex toggle → flash-prone, no enter motion, off-token colors.
     · .mk-modal (record-match contact/location forms) — a bespoke mk-* twin.
   Both are replaced by this single primitive (Constitution LAW 15 small blast
   radius + LAW 42 documented intentional structure; LAW 30 one design system —
   "modals" is named in the system; LAW 31 token-only; LAW 32 no-flash; LAW 33
   four-state; LAW 28 accessibility floors + purposeful GPU motion).

   SUBSTRATE — native <dialog> + showModal():
     A <dialog> with no [open] attribute is display:none from the UA stylesheet,
     which the browser applies BEFORE our CSS and BEFORE first paint. The modal
     therefore CANNOT paint before JS — no-flash by construction, immune to
     stylesheet load-order or where the markup sits in the pane (kills Dave's
     flash structurally, not with a JS hide-after-paint). showModal() also gives
     us, for free: aria-modal semantics, an inert background (real focus trap),
     ESC-to-close, focus-return-to-invoker, ::backdrop, and the top layer — the
     top layer floats above the workspace tab-swap geometry, so a modal opened
     from any pane is never clipped or stranded by the pane re-exec engine.
     The singleton host lives OUTSIDE #cjfw-ws-pane (emitted once by the shell),
     so pane swaps never touch it; the controller (cjfw-shell.js scope) is always
     loaded and resolves nodes at call time. See the spec for the JS contract.

   NO-FLASH GUARANTEE (the load-bearing rule):
     The base .cjfw-modal carries NO `display` — closed stays UA display:none.
     Layout `display:grid` is applied ONLY by `.cjfw-modal[open]`, and [open] is
     set ONLY by showModal(). There is no code path where the dialog is laid out
     without the controller having opened it.
   ============================================================================ */

/* The <dialog> is a transparent, viewport-filling layer; the visible card is
   .cjfw-modal__panel. Filling the viewport lets a click in the gutter around the
   panel land on the <dialog> itself (→ backdrop-close) while a click on the panel
   lands on a child (→ stays open). Base rule sets NO display (see guarantee). */
.cjfw-modal{
  position:fixed;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;
  margin:0;padding:var(--cjfw-space-5);border:0;background:transparent;color:var(--cjfw-text);
  overflow:auto;overscroll-behavior:contain;
  /* keep the dialog in the top layer through its exit animation (LAW 28) */
  transition:overlay var(--cjfw-med) var(--cjfw-ease) allow-discrete,
             display var(--cjfw-med) var(--cjfw-ease) allow-discrete;
}
.cjfw-modal[open]{display:grid;place-items:center}   /* ONLY when opened by showModal() */

/* Scrim — a real ::backdrop, dimmed + blurred, token-driven, fades with the panel */
.cjfw-modal::backdrop{
  background:rgba(3,5,10,.62);backdrop-filter:blur(3px) saturate(120%);
  opacity:1;
  transition:opacity var(--cjfw-med) var(--cjfw-ease),
             overlay var(--cjfw-med) var(--cjfw-ease) allow-discrete,
             display var(--cjfw-med) var(--cjfw-ease) allow-discrete;
}

/* The visible card. max-width is a per-size token; height caps to the viewport
   and the BODY scrolls, not the page (four-state LOADED for long forms). */
.cjfw-modal__panel{
  position:relative;width:100%;max-width:var(--cjfw-modal-w,560px);
  max-height:calc(100dvh - (2 * var(--cjfw-space-5)));
  display:flex;flex-direction:column;min-height:0;
  background:var(--cjfw-surface);border:1px solid var(--cjfw-border);
  border-radius:var(--cjfw-radius-lg);
  box-shadow:var(--cjfw-shadow),0 40px 90px -34px rgba(0,0,0,.6);
  overflow:hidden;
  /* resting (open) state; enter/exit interpolates from @starting-style below */
  opacity:1;transform:translateY(0) scale(1);
  transition:opacity var(--cjfw-med) var(--cjfw-ease),
             transform var(--cjfw-med) var(--cjfw-ease);
}

/* SIZES — set the width token on the dialog; default (no attr) = md (560px) */
.cjfw-modal[data-cjfw-size="sm"] .cjfw-modal__panel{--cjfw-modal-w:420px}   /* confirm  */
.cjfw-modal[data-cjfw-size="md"] .cjfw-modal__panel{--cjfw-modal-w:560px}   /* form     */
.cjfw-modal[data-cjfw-size="lg"] .cjfw-modal__panel{--cjfw-modal-w:760px}   /* large    */

/* ENTER motion — @starting-style is the "from" state as the dialog flips
   display:none → grid; the transition above carries it to rest. GPU props only
   (opacity/transform). Reduced-motion is neutralized at the foot of this block. */
@starting-style{
  .cjfw-modal[open] .cjfw-modal__panel{opacity:0;transform:translateY(12px) scale(.985)}
  .cjfw-modal[open]::backdrop{opacity:0}
}

/* ---- Header ---- */
.cjfw-modal__head{
  display:flex;align-items:center;gap:12px;flex:0 0 auto;
  padding:18px 20px 14px;border-bottom:1px solid var(--cjfw-divider);
}
.cjfw-modal__icon{
  width:34px;height:34px;border-radius:10px;flex:0 0 auto;display:grid;place-items:center;font-size:15px;
  background:color-mix(in srgb,var(--cjfw-accent) 14%,transparent);color:var(--cjfw-accent);
}
.cjfw-modal__title{flex:1;min-width:0;font-size:16.5px;font-weight:800;letter-spacing:-.02em;line-height:1.25}
.cjfw-modal__sub{font-size:12.5px;color:var(--cjfw-muted);font-weight:600}
.cjfw-modal__close{
  flex:0 0 auto;width:var(--cjfw-tap);height:var(--cjfw-tap);   /* 44px hit target (S-14) */
  border-radius:10px;border:1px solid var(--cjfw-border);background:var(--cjfw-surface-2);
  color:var(--cjfw-text-2);display:grid;place-items:center;font-size:15px;cursor:pointer;
  transition:background var(--cjfw-fast),color var(--cjfw-fast);
}
.cjfw-modal__close:hover{background:var(--cjfw-surface-3);color:var(--cjfw-text)}
.cjfw-modal__close:focus-visible{outline:none;box-shadow:var(--cjfw-focus-ring)}

/* ---- Body slot — arbitrary content (a <form>, confirm prose, secret reveal) ---- */
.cjfw-modal__body{padding:18px 20px;overflow:auto;min-height:0;flex:1 1 auto}
.cjfw-modal__body>p{font-size:13.5px;color:var(--cjfw-text-2);line-height:1.55}
.cjfw-modal__body>p+p{margin-top:10px}

/* ---- Footer / actions slot ---- */
.cjfw-modal__foot{
  display:flex;align-items:center;gap:10px;flex:0 0 auto;flex-wrap:wrap;
  padding:14px 20px;border-top:1px solid var(--cjfw-divider);background:var(--cjfw-bg-2);
}
.cjfw-modal__spacer{flex:1}
/* the No-Silent-Failure status/error slot (LAW 17 / LAW 33 ERROR state); the
   controller writes inline copy here — never an alert(), never a dead click. */
.cjfw-modal__msg{
  font-size:12px;font-weight:600;margin-right:auto;min-height:1em;line-height:1.4;
  display:inline-flex;align-items:center;gap:6px;color:var(--cjfw-muted);
}
.cjfw-modal__msg--err{color:var(--cjfw-neg)}
.cjfw-modal__msg--ok{color:var(--cjfw-pos)}

/* ---- DESTRUCTIVE variant — kill / regenerate / delete flows ---- */
.cjfw-modal[data-cjfw-variant="destructive"] .cjfw-modal__icon{
  background:color-mix(in srgb,var(--cjfw-neg) 15%,transparent);color:var(--cjfw-neg);
}
.cjfw-modal[data-cjfw-variant="destructive"] .cjfw-modal__panel::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--cjfw-neg);
  border-radius:var(--cjfw-radius-lg) var(--cjfw-radius-lg) 0 0;z-index:1;
}

/* Scroll-lock — controller adds .cjfw-modal-lock to <html> while any modal is
   open; JS sets --cjfw-sbw to the scrollbar width so the lock causes NO layout
   shift (LAW 32 no-jump). */
.cjfw-modal-lock{overflow:hidden !important}
.cjfw-modal-lock body{padding-right:var(--cjfw-sbw,0)}

/* Reduced motion — appear/vanish instantly, no slide/scale (LAW 28 / S-14).
   (The global prefers-reduced-motion block already zeroes durations; these
   neutralize the @starting-style so nothing pops in from an offset.) */
@media (prefers-reduced-motion:reduce){
  .cjfw-modal,.cjfw-modal__panel,.cjfw-modal::backdrop{transition-duration:.01ms !important}
  @starting-style{
    .cjfw-modal[open] .cjfw-modal__panel{opacity:1;transform:none}
    .cjfw-modal[open]::backdrop{opacity:1}
  }
}

/* Narrow viewports — panel goes near-full-width, gutter shrinks (LAW 26 reflow) */
@media (max-width:560px){
  .cjfw-modal{padding:var(--cjfw-space-3)}
  .cjfw-modal__panel{max-height:calc(100dvh - (2 * var(--cjfw-space-3)))}
  .cjfw-modal__foot{gap:8px}
  .cjfw-modal__foot .cjfw-btn{flex:1 1 auto}   /* full-width thumb-friendly actions */
  .cjfw-modal__spacer{display:none}
}

/* ---- Danger button — the destructive confirm action (replaces the inline
   style="background:var(--cjfw-danger,#b3261e)" the old modals hardcoded off a
   token that doesn't exist; the real token is --cjfw-neg). LAW 30/31. ---- */
.cjfw-btn--danger{background:var(--cjfw-neg);color:#fff;border-color:var(--cjfw-neg);box-shadow:var(--cjfw-shadow-sm)}
.cjfw-btn--danger:hover{background:color-mix(in srgb,var(--cjfw-neg) 86%,#000);box-shadow:var(--cjfw-shadow)}

/* ==========================================================================
   TAG MANAGER — the Integrations Manage modal's sub-groups (M-91, Dave's
   rulings 1/3/4/6; Canvas's addendum.css, merged).

   TOKENS ONLY, no hardcoded values. Note --cjfw-border (NOT --cjfw-line, which
   does not exist — the `var(--cjfw-line, #e4e4e7)` fallbacks elsewhere on the
   Integrations page are the same off-token habit the modal primitive already
   corrected for --cjfw-danger→--cjfw-neg; nothing new is added to that pile
   here). LAW 30/31.

   These style the sub-group pattern INSIDE the existing modal primitive — they
   add no new dialog mechanics, no new overlay, no second popup system. The
   <details class="cjfw-rowedit"> disclosure this replaces had no CSS of its own
   in this file (it rode the raw element), so nothing is orphaned by its
   retirement.
   ========================================================================== */
.cjfw-mgroup{padding:14px 0;border-top:1px solid var(--cjfw-border)}
.cjfw-mgroup:first-child{border-top:0;padding-top:0}
.cjfw-mgroup__h{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--cjfw-text-2);margin:0 0 6px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cjfw-mgroup__lead{font-size:13px;line-height:1.6;margin:0 0 6px}
/* The removal legs — a LIST because it is a list. It replaces a hand-written
   paragraph that claimed three legs on sources that had one; the server now
   computes exactly the legs that will really run, so the markup has to be able
   to show one, two or four of them without reading as a broken sentence. Same
   type scale as __lead: this is the lead now, it is just generated. */
.cjfw-mgroup__legs{font-size:13px;line-height:1.6;margin:0 0 6px;padding-left:18px}
.cjfw-mgroup__legs li{margin:0 0 3px}
.cjfw-mgroup__legs li:last-child{margin-bottom:0}
.cjfw-mgroup__meta{font-size:11.5px;color:var(--cjfw-muted);line-height:1.5}
.cjfw-mgroup__actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}
/* The credential box carries a faint raised ground so the three concerns read as
   three THINGS, not three paragraphs — the legibility Dave asked for. */
.cjfw-mgroup--cred{background:var(--cjfw-surface-2);border-radius:var(--cjfw-radius-sm);
  padding:12px 14px;margin-top:10px;border-top:0}
/* --cjfw-neg-text, NOT --cjfw-neg: this heading is 11px/700 = normal text (no
   large-text exemption at that size), so the 4.5 floor applies and the fill
   token misses it at 3.18:1 default / 3.31:1 jolt (G-189). The button below it
   keeps --cjfw-neg because a fill is exactly what a button is. Both pairs are
   measured in tests/test_token_contrast.py. */
.cjfw-mgroup--danger .cjfw-mgroup__h{color:var(--cjfw-neg-text)}

/* "Affects live data" vs "Offline only" — the pill that ends the conflation
   between the webhook signing secret (the live app reads it) and the account API
   key (only Atlas's offline script does). It is a LABEL, not decoration: it is
   the same fact the confirm contract gates on (slot.live_impact), rendered. */
.cjfw-pill{font-size:9.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  padding:2px 7px;border-radius:var(--cjfw-radius-pill);background:var(--cjfw-surface-3);
  color:var(--cjfw-muted);border:1px solid var(--cjfw-border)}
.cjfw-pill--live{color:var(--cjfw-warn);border-color:var(--cjfw-warn)}

/* THE CONFLICT LINE — muted amber, never red: two truth-sources disagreeing is
   a "look at this", not a failure, and nothing was changed automatically. */
.cjfw-conflict{display:block;font-size:11.5px;line-height:1.5;color:var(--cjfw-warn);
  margin-top:6px;padding:6px 8px;border-radius:var(--cjfw-radius-sm);
  border:1px solid var(--cjfw-warn);background:transparent}

/* SYSTEM-AUTHORED NOTE (ruling 8) — visibly not the human's field. Muted +
   italic + a "System" tag, read-only by construction: there is no input here,
   because the update service takes no parameter for this column. */
.cjfw-sysnote{margin-top:8px;font-size:11.5px;line-height:1.5;color:var(--cjfw-muted);
  font-style:italic;display:flex;gap:6px;align-items:flex-start}
.cjfw-sysnote__tag{font-style:normal;font-size:9.5px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;padding:1px 6px;border-radius:var(--cjfw-radius-pill);
  background:var(--cjfw-surface-3);color:var(--cjfw-muted);border:1px solid var(--cjfw-border);
  flex:none}

/* Advanced disclosure — the expert path, demoted but never removed (Dave's
   symmetry rule: staff can manage ANYTHING here). */
.cjfw-adv{margin-top:12px}
.cjfw-adv > summary{font-size:11.5px;color:var(--cjfw-text-2);cursor:pointer;
  padding:6px 0;list-style:revert}
.cjfw-adv > summary:focus-visible{outline:2px solid var(--cjfw-accent);outline-offset:2px;
  border-radius:var(--cjfw-radius-sm)}

/* The masked confirm row of the paste-and-seal flow (step 2). */
.cjfw-pasteflow__confirm{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:10px 12px;border-radius:var(--cjfw-radius-sm);background:var(--cjfw-surface-2);
  border:1px solid var(--cjfw-border)}
.cjfw-pasteflow__confirm .val{font-size:12.5px;word-break:break-all}
