{
  "$schema": "https://design-tokens.org/draft (DTCG-style; resolved by build.mjs)",
  "$description": "screamingface — canonical design tokens for the honest-AGI initiative. SINGLE SOURCE OF TRUTH. Edit here, then `node build.mjs` to regenerate dist/. Never hand-edit dist/*. Standalone OpenMined brand system — self-contained, no external design-system dependency.",
  "color": {
    "$description": "SFDS v2 — GENERATION CONFIG, not literal values. build.mjs feeds this whole block to tokens/color-gen.mjs (zero-dep OKLCH engine, ported from the round-2-final Python generator) which SOLVES the full 12-step scale per family per mode, the semantic themes, the data-viz scales, the gradient, and the alpha overlays. Model: 12-step role-per-step (Radix-class) — 1-8 backgrounds/borders (fixed OKLab-L profile per mode), 9 solid (hue's chroma-cusp L, binary-searched argmax in-gamut chroma), 10 hover-solid (cusp nudged), 11/12 text (L solved by APCA bisection against step-2 bg, targets 75/90 (low raised from 60, 2026-07-17 — legibility is the brand: text-low must clear ~4.5:1 WCAG at small sizes on both grounds)). Chroma follows a parabola peaking at step 9, tapered in dark mode. A small deliberate hue rotation runs across the ramp. Neutral is near-achromatic (fixed tiny chroma, no cusp/parabola). Edit values here to retune the system; never hand-edit dist/tokens.css.",
    "families": {
      "gold": {
        "seed": "#d88507",
        "warm": true,
        "$note": "brand + the one 'gain/SOTA/winner' hue. Marketing-theme accent."
      },
      "blue": {
        "seed": "#8fadde",
        "warm": false,
        "hueShiftDeg": -2.1,
        "$note": "App-theme accent + info. Raw seed hue nudged toward a softened, confident true-blue (the un-nudged hue overshot into dark electric indigo)."
      },
      "green": {
        "seed": "#3a9d54",
        "warm": false,
        "$note": "success"
      },
      "persimmon": {
        "seed": "#d45c36",
        "warm": true,
        "$note": "warning — STATUS ONLY, never a chart series (Bennett 2026-08-07, dial 1 = A). Hue 38deg: the persimmon pocket between the gold pole (66.7) and danger red (25). Replaces orange (hue 52, retired same day — it orbited inside the gold pole's space; the eye beats the dE floor). --orange-*/--amber-* alias here."
      },
      "red": {
        "seed": "#c23b3b",
        "warm": true,
        "$note": "danger"
      },
      "rose": {
        "seed": "#e45396",
        "warm": true,
        "$note": "chart rose promoted to a full UI family (palette merge 2026-08-07)."
      },
      "violet": {
        "seed": "#9253d2",
        "warm": false,
        "$note": "NEW 2026-08-07: the purple band (280-330) reopened by Bennett to round out the merged palette. Violet is a full family + the 7th categorical hue (304deg, brute-force placed: it LIFTS the adjacency floors, norm dE 17.9 -> 24.9). Still never the brand accent - gold leads, violet is a series/spectrum color."
      },
      "cyan": {
        "seed": "#0098a3",
        "warm": false,
        "$note": "cast seat 5 (2026-08-07, the 7-color cast): hue 204, the blue<->green midpoint pushed blue-ward — teal (182) retired for crowding green at dE 10.9. Solid darkened for chart duty (white text + 3:1 on the light ground). Closest cast pair is cyan<->blue (dE 13.1) — flagged and accepted: sky vs sea, different in kind, never adjacent in the order."
      }
    },
    "neutral": {
      "hueDeg": 255,
      "chromaLight": 0.004,
      "chromaDark": 0.01,
      "solidL": 0.5,
      "$note": "Near-achromatic cool with per-theme temperature (one base direction per theme): LIGHT chromaLight 0.004 reads as clean near-white / neutral-grey (a barely-there cool), DARK chromaDark 0.010 reads as a clear cool blue-black. H255 both. Cool ground + warm gold accent. Was warm (H85) → uniform-cool (0.010) → per-theme, 2026-07-17."
    },
    "lightL": {
      "1": 0.994,
      "2": 0.973,
      "3": 0.947,
      "4": 0.918,
      "5": 0.887,
      "6": 0.854,
      "7": 0.818,
      "8": 0.775
    },
    "darkL": {
      "1": 0.13,
      "2": 0.168,
      "3": 0.208,
      "4": 0.25,
      "5": 0.293,
      "6": 0.34,
      "7": 0.4,
      "8": 0.472
    },
    "chromaFrac": {
      "1": 0.03,
      "2": 0.05,
      "3": 0.08,
      "4": 0.1,
      "5": 0.13,
      "6": 0.16,
      "7": 0.2,
      "8": 0.26,
      "9": 1,
      "10": 0.95,
      "11": 0.55,
      "12": 0.45
    },
    "darkChromaMult": 0.82,
    "solidNudge": 0.04,
    "rotationTotalDeg": 6,
    "solidChromaCap": {
      "gold": 0.82,
      "blue": 0.72,
      "green": 0.74,
      "rose": 0.9,
      "violet": 0.9,
      "persimmon": 0.85,
      "cyan": 1,
      "$note": "Chroma cap (fraction of cusp chroma) for the step-9/10 solid. Default (unlisted) = 1.0. green capped so success doesn't go electric; blue/gold per the original tuning; cyan runs uncapped (the sRGB cyan band is chroma-poor — it needs everything it has)."
    },
    "solidLDelta": {
      "gold": {
        "light": 0.087,
        "dark": 0.0886
      },
      "blue": {
        "light": -0.06,
        "dark": -0.0808
      },
      "green": {
        "light": 0.2272,
        "dark": 0.201
      },
      "cyan": {
        "light": 0.2209,
        "dark": 0.1974
      },
      "$note": "SOLID UNIFICATION (2026-08-07): every family solid takes WHITE text at APCA >= 58 in BOTH modes — one fg contract, direct swappability. Darken-only from the natural cusp solids; unlisted families (red/rose/violet/persimmon/magenta) already clear the floor at lDelta 0. green + cyan darken further so their solids also clear 3:1 against the LIGHT ground — they serve as chart series fills (green light deepened per Bennett dial 2, #25b14c -> #00aa42). Supersedes the 2026-07-17 blue-dark black-text decision. The historic BRIGHT gold survives as winFill (--gain-fill)."
    },
    "textTargets": {
      "low": 75,
      "high": 90,
      "lowOverride": {
        "gold": {
          "light": 62
        },
        "$note": "Documented brand exception: gold accent text on LIGHT targets Lc 62 (APCA fluent-text floor) — at Lc 75 gold is forced so dark it reads umber regardless of chroma; the brand accent must READ gold. Dark keeps 75 (gold-on-dark is luminous anyway). Consumers compensate with semibold at small sizes."
      }
    },
    "textChromaBoost": {
      "gold": 1.5,
      "$note": "Per-family chroma multiplier for the step-11 text-low solve (gamut-clamped, contrast-neutral: APCA still solves L). Gold at Lc 75 drifted BROWN at base chroma — the boost restores hue identity so gold text reads gold, not umber."
    },
    "apcaSolidFloor": 58,
    "roleSteps": {
      "$description": "Semantic action-role -> primitive step, applied per family (action) and for the neutral structural ladder (neutral). This is what themes below alias.",
      "action": {
        "bg-subtle": 2,
        "component": 3,
        "component-hover": 4,
        "component-active": 5,
        "border-subtle": 6,
        "border": 7,
        "border-strong": 8,
        "focus-ring": 8,
        "solid": 9,
        "solid-hover": 10,
        "text-low": 11,
        "text-high": 12
      },
      "neutral": {
        "app-bg": 1,
        "surface": 2,
        "surface-raised": 2,
        "ui-bg": 3,
        "ui-bg-hover": 4,
        "ui-bg-active": 5,
        "border-subtle": 6,
        "border": 7,
        "border-strong": 8,
        "text-secondary": 11,
        "text-primary": 12
      }
    },
    "themes": {
      "$description": "Role -> family map. Both themes draw from the identical 12-step primitives; only the role->family mapping differs. app = product/UI (accent=blue, the cool interactive hue). marketing = brand-forward pages (accent=gold, brand leads as hero). build.mjs emits `app` to :root/[data-theme=dark] by default and overrides ONLY the accent-family aliases under [data-brand=marketing].",
      "app": {
        "accent": "blue",
        "brand": "gold",
        "gain": "gold",
        "success": "green",
        "warning": "persimmon",
        "danger": "red",
        "info": "blue"
      },
      "marketing": {
        "accent": "gold",
        "brand": "gold",
        "gain": "gold",
        "success": "green",
        "warning": "persimmon",
        "danger": "red",
        "info": "blue"
      }
    },
    "data": {
      "$description": "Data-viz palettes. categoricalPairs are literal anchor hexes (light=@600, dark=@400 verbatim; the 5-step ramp interpolates 300/500/700 from these two). sequential/diverging are DERIVED from the family primitives above (hue + cusp chroma), not literal.",
      "sequential": {
        "family": "blue",
        "steps": 7,
        "$note": "single-hue magnitude ramp (heatmaps) — blue: magnitude stays semantically neutral; gold = the win, never a scale"
      },
      "diverging": {
        "negFamily": "blue",
        "posFamily": "gold",
        "steps": 9,
        "$note": "the 'gain over SOTA' below/above-baseline encoding; two constant hues only (never interpolated through the circle, so it can't pass through purple), chroma tapers to ~0 at the shared light-neutral center"
      },
      "categorical": {
        "$note": "v6 (2026-08-07, Bennett: 'we can use gold in data viz'): SEVEN series — the family solids, zero values defined here (the 12-step scales are the single source). GOLD takes the seventh seat as the unified solid, same rules as everyone — and it LIFTS the order floors (it's the warm spacer): ORDER blue - red - cyan - gold - rose - violet - green, adjacent floors light dE 14.6/23.8, dark 12.2/20.0 (protan-deutan/normal, mode-shared). THE SKIP RULE: series-gold (#d58922) and the win fill (--gain #ec9f3f) are deliberately kin (dE ~7) — when a chart draws the WIN in gold (leading row, SOTA mark, fusion-grad), skip gold in the deal and take the next series. Series 8-14 = the same solids mixed 55% into the ground, in order (also: actual = solid, forecast = the mix). Persimmon (warning) is never a series. Near-pairs flagged + accepted (never adjacent, different in kind): cyan<->blue 13.1, red<->rose 13.0. History: azure/vermillion (redundant blue/red names), teal (crowded green, dE 10.9), orange (crowded the gold pole), magenta (second pink, dE 12.6; under CVD collapses toward cyan) all retired 2026-08-07; legacy --data-<hue>-* alias through. Sequential stays blue (gold is a series or the win, never a magnitude scale).",
        "order": [
          "blue",
          "red",
          "cyan",
          "gold",
          "rose",
          "violet",
          "green"
        ]
      }
    },
    "gradient": {
      "$description": "The single sanctioned SFDS gradient token (fusion-grad): a symmetric gold → luminous near-white → blue sweep mirroring the 😱 (gold face · white middle · blue crown). OKLCH-interpolated over 32 stops so it stays smooth on large fills. Hue holds gold across the warm half and blue across the cool half; the near-neutral center masks the switch, so no green and no purple ever appear. dawn + baseline are intentionally NOT wired.",
      "fusionGrad": {
        "note": "Gold → luminous near-white bridge → blue. Chroma dips to near-zero at the center while LIGHTNESS peaks, so it reads as a clean glow, not a muddy gray. Symmetric, emoji-faithful.",
        "angleDeg": 100,
        "points": 32,
        "controlPoints": [
          [
            0,
            0.69,
            0.15,
            "gold"
          ],
          [
            0.22,
            0.77,
            0.1,
            "gold"
          ],
          [
            0.44,
            0.92,
            0.02,
            "gold"
          ],
          [
            0.5,
            0.955,
            0.008,
            "blue"
          ],
          [
            0.58,
            0.9,
            0.03,
            "blue"
          ],
          [
            0.72,
            0.82,
            0.07,
            "blue"
          ],
          [
            1,
            0.66,
            0.16,
            "blue"
          ]
        ]
      }
    },
    "alpha": {
      "stops": [
        5,
        10,
        20,
        40,
        60
      ],
      "$note": "neutral = black-on-light / white-on-dark overlay tints. accent-<theme> = that theme's accent-9 solid, tinted — for hover/scrim/overlay use."
    },
    "winFill": {
      "family": "gold",
      "lDelta": 0.018,
      "$note": "the bright 'win' fill — the pre-unification gold solid, regenerated with the ORIGINAL small lDelta so --gain-fill/--gain stay the luminous medal/SOTA/chart gold even though the gold BUTTON solid darkened for the white-text unification. Hover = same construction nudged by solidNudge. Non-text roles only."
    }
  },
  "font": {
    "$description": "display = Parastoo (marketing headlines — warm editorial serif, the expressive voice). sans = IBM Plex Sans (the load-bearing product/UI + body). mono = IBM Plex Mono (data, labels, code, receipts, the rail). wordmark = Plex Sans 600 tight (the quiet, engineered lockup; Rubik retired). All self-hosted (brand-site/fonts.css) — no external font CDN.",
    "display": {
      "$type": "fontFamily",
      "$value": "\"Parastoo\", \"Iowan Old Style\", Georgia, \"Times New Roman\", serif",
      "$description": "Marketing headlines / h1. Parastoo (Saber Rastikerdar, OFL) — a warm editorial serif for the expressive marketing register. The sans (IBM Plex Sans) does the load-bearing product/UI work. Self-hosted, 4 static weights (400–700)."
    },
    "sans": {
      "$type": "fontFamily",
      "$value": "\"IBM Plex Sans\", system-ui, -apple-system, \"Segoe UI\", sans-serif"
    },
    "mono": {
      "$type": "fontFamily",
      "$value": "\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, monospace"
    },
    "wordmark": {
      "$type": "fontFamily",
      "$value": "\"IBM Plex Sans\", system-ui, sans-serif",
      "$description": "The screamingface wordmark/logo lockup only — Plex Sans set tight (medium at display sizes, semibold at rail size). Rubik retired 2026-07-15. Not for UI or body type."
    }
  },
  "size": {
    "$description": "Layout constants, not part of the color theme.",
    "col": {
      "$type": "dimension",
      "$value": "760px"
    },
    "col-wide": {
      "$type": "dimension",
      "$value": "1000px"
    },
    "rail-h": {
      "$type": "dimension",
      "$value": "44px"
    }
  },
  "text": {
    "$description": "Type scale — one font-size per role. Compose with --f-*, --weight-*, --tracking-*, --leading-*. Eight roles, deliberately few. Two registers share one scale: MARKETING leads with hero/display in Parastoo; PRODUCT tops out at display and is carried by Sans + Mono.",
    "hero": {
      "$type": "dimension",
      "$value": "clamp(44px, 6vw, 76px)",
      "$description": "marketing hero headline only (Parastoo). Fluid; never in product UI."
    },
    "display": {
      "$type": "dimension",
      "$value": "38px",
      "$description": "h1 / section display (Parastoo)"
    },
    "title": {
      "$type": "dimension",
      "$value": "24px",
      "$description": "section sub-heads / card titles (Sans semibold or Parastoo 500)"
    },
    "metric": {
      "$type": "dimension",
      "$value": "30px",
      "$description": "big stat numbers (Mono)"
    },
    "lead": {
      "$type": "dimension",
      "$value": "20px",
      "$description": "the one opening line (Sans)"
    },
    "body": {
      "$type": "dimension",
      "$value": "16px",
      "$description": "all prose (Sans)"
    },
    "sm": {
      "$type": "dimension",
      "$value": "13px",
      "$description": "captions, table/data, climb (Sans or Mono)"
    },
    "micro": {
      "$type": "dimension",
      "$value": "12px",
      "$description": "chart ticks/labels, rail, footer (Mono)"
    },
    "label": {
      "$type": "dimension",
      "$value": "11px",
      "$description": "ALL uppercase labels: eyebrow, kickers, table headers, kv keys (Mono 500, tracking-label). One weight, one tracking — the single caps treatment. (h2 is no longer a label — it's a sans display heading.)"
    }
  },
  "weight": {
    "regular": {
      "$type": "number",
      "$value": "400"
    },
    "medium": {
      "$type": "number",
      "$value": "500"
    },
    "display": {
      "$type": "number",
      "$value": "500",
      "$description": "serif display (Parastoo) at hero/display sizes — MEDIUM, its stroke contrast carries the mass. Sans titles/headings stay semibold. Decided 2026-07-16 on the guide masthead; written back per the round-trip rule."
    },
    "semibold": {
      "$type": "number",
      "$value": "600"
    }
  },
  "tracking": {
    "tight": {
      "$type": "dimension",
      "$value": "-0.01em"
    },
    "normal": {
      "$type": "dimension",
      "$value": "0"
    },
    "label": {
      "$type": "dimension",
      "$value": "0.1em",
      "$description": "the single tracking for all caps labels"
    }
  },
  "leading": {
    "hero": {
      "$type": "number",
      "$value": "0.98",
      "$description": "hero/display serif only. OPTICALLY set for Parastoo: its Perso-Arabic vertical metrics leave Latin caps small in a tall em, so numeric 1.05 reads loose — 0.98 lands the classic tight display look."
    },
    "tight": {
      "$type": "number",
      "$value": "1.16"
    },
    "snug": {
      "$type": "number",
      "$value": "1.38",
      "$description": "deks/leads — tightened optically for 18-20px Plex Sans"
    },
    "body": {
      "$type": "number",
      "$value": "1.6"
    }
  },
  "space": {
    "1": {
      "$type": "dimension",
      "$value": "4px"
    },
    "2": {
      "$type": "dimension",
      "$value": "8px"
    },
    "3": {
      "$type": "dimension",
      "$value": "12px"
    },
    "4": {
      "$type": "dimension",
      "$value": "16px"
    },
    "5": {
      "$type": "dimension",
      "$value": "20px"
    },
    "6": {
      "$type": "dimension",
      "$value": "24px"
    },
    "7": {
      "$type": "dimension",
      "$value": "32px"
    },
    "8": {
      "$type": "dimension",
      "$value": "40px"
    },
    "9": {
      "$type": "dimension",
      "$value": "52px"
    },
    "10": {
      "$type": "dimension",
      "$value": "64px"
    },
    "11": {
      "$type": "dimension",
      "$value": "80px"
    },
    "12": {
      "$type": "dimension",
      "$value": "96px"
    },
    "$description": "4px-based spacing scale for padding, margin, gap."
  },
  "radius": {
    "$description": "The system is square. Radius is 0, on purpose (see anti-rules) — with ONE sanctioned exception: window-chrome frames.",
    "none": {
      "$type": "dimension",
      "$value": "0"
    },
    "window": {
      "$type": "dimension",
      "$value": "10px",
      "$description": "window-chrome frames ONLY (.note terminal boxes). Decided 2026-07-16: a terminal window without rounded corners does not read as a terminal window. 10px matches macOS."
    }
  },
  "shadow": {
    "$description": "The system is FLAT — depth from spacing and rules (see anti-rules). ONE sanctioned exception: floating window chrome.",
    "window": {
      "$type": "shadow",
      "$value": "0 2px 6px rgba(20,28,52,.05), 0 16px 40px rgba(20,28,52,.11)",
      "$description": "window-chrome (.note terminal), LIGHT mode — soft, diffuse, cool-tinted low-alpha elevation (a heavy black shadow reads stark on a near-white page)."
    },
    "window-dark": {
      "$type": "shadow",
      "$value": "0 4px 14px rgba(0,0,0,.25), 0 18px 50px rgba(0,0,0,.35)",
      "$description": "window-chrome, DARK mode — the deeper macOS-like ambient+key shadow that reads as depth on a dark ground. Applied via [data-theme=dark] .note."
    }
  },
  "border": {
    "hairline": {
      "$type": "dimension",
      "$value": "1px"
    },
    "strong": {
      "$type": "dimension",
      "$value": "2px"
    }
  },
  "terminal": {
    "$description": "The 'macOS terminal' chrome (.note window) as an ELEVATED NEUTRAL surface — same cool-neutral family as the whole page (not a separate blue), so it never out-tints the ground. It reads as a terminal via elevation (shadow) + a crisp neutral edge + one surface step, and it flips with the page (light near-white card, dark cool panel). All var() refs.",
    "bg": {
      "$type": "color",
      "$value": "var(--surface)",
      "$description": "window body — neutral surface (light near-white, dark cool panel)"
    },
    "chrome": {
      "$type": "color",
      "$value": "var(--surface-2)",
      "$description": "title bar — one neutral step off the body"
    },
    "line": {
      "$type": "color",
      "$value": "var(--border)",
      "$description": "window border + title-bar seam — neutral border (crisp, not a fuzzy low-contrast tint)"
    },
    "ink": {
      "$type": "color",
      "$value": "var(--ink-2)",
      "$description": "regular terminal text"
    },
    "strong": {
      "$type": "color",
      "$value": "var(--ink)",
      "$description": "emphasis / bold / winning-row text"
    },
    "dim": {
      "$type": "color",
      "$value": "var(--ink-2)",
      "$description": "muted TEXT in the terminal body — the secondary text role (readable; audit 2026-07-17)"
    },
    "deco": {
      "$type": "color",
      "$value": "var(--ink-3)",
      "$description": "decorative window chrome ONLY — the traffic-light dots, the title-bar label, non-winning bar fills. Deliberately quiet (Bennett 2026-07-17: chrome should recede); never for body/reading text."
    },
    "accent": {
      "$type": "color",
      "$value": "var(--gain-text-low)",
      "$description": "prompt $, kv keys, receipt — gold that stays readable on both grounds"
    },
    "track": {
      "$type": "color",
      "$value": "var(--surface-2)",
      "$description": "score-bar groove"
    }
  }
}