/* ==========================================================================
   Demand Definition — token system
   Layer 0 of the design system. Colour is not a palette here; it is the
   framework made visible, so the tokens are named in framework vocabulary
   and everything else is derived from them.

   ── CANONICAL ───────────────────────────────────────────────────────────
   This file is the single source of truth for Demand Definition colour.
   If any other file disagrees with it, this file wins. Style against
   var(--dd-*); never copy these hexes out into a separate palette.

   Nothing else in this repo is a palette. See ../README.md for the list of
   files that contain colours but must not be read as one.

   Load order: this file LAST, after any theme or reset. It needs no other
   stylesheet. An earlier version of this note named colors_and_type.css as
   a prerequisite — that is the superseded Tripleniche palette, now under
   archive-tripleniche/. Do not load it.

   ── WHAT THIS IS ────────────────────────────────────────────────────────
   The demand-side ontology is where buyers meet suppliers. Literally, it
   is an address. Three axes locate one point: what the person wants
   (market), where they are in deciding (journey), and who they are
   (audience). A block is an address, and every address has a colour.

   ── THE NAMING LAW ──────────────────────────────────────────────────────
     --dd-<axis>-[<column>-]<level>[-<role>]

   <axis>    market | journey | audience        (the three kinds of words)
   <column>  audience only, and only where that column is graded. Market is
             a single column so its name is elided; journey has no columns.
   <level>   a level name from that axis's own vocabulary — never a number,
             never a design word like "primary", "500", "light", "accent"
   <role>    omitted for the fill itself; wash | zone | hover | ink for the
             values DERIVED from that fill

   Worked examples:

     --dd-market-topic                market has one column, elided
     --dd-audience-location-niche     column + level  ("location:niche")
     --dd-audience-brand              a column with no levels
     --dd-journey-solution            a stage, never a level

   If a token cannot be named this way it is not a framework token — it
   belongs in the SURFACE section at the foot, which is deliberately small.

   ── THE ONE SCALE ───────────────────────────────────────────────────────
   The one scale is VALUE. Every axis is an ordered scale of value, and
   colour intensity renders it: darker is worth more. That is the whole
   of Layer 1.

   Value is earned the same way on all three axes — by raising interest —
   but each axis raises it differently:

     market    specificity of the SUBJECT raises interest in that subject.
               This is where intent comes from, which is why market's
               levels are named for interest.
     audience  specificity of IDENTITY sharpens the address. Everyone in
               Milton Keynes is worth more than everyone in the UK — to
               both sides of the meeting, which is the point of an address.
     journey   narrows nothing. It raises interest in BUYING: provider
               words are someone closer to a purchase.

   So specificity drives market and audience; sale-proximity drives
   journey. All three arrive at value, and value is what you can see.

   ── THE TWO CHANNELS ────────────────────────────────────────────────────
   Value travels in two channels. They are the SAME signal, never
   alternatives, and they must never disagree:

     Layer 1  fill colour   →  which axis, which column, and the value
     Layer 2  text format   →  the value again  (weight · style · opacity)

   Where a column is graded, its levels are steps on that column's own
   colour ramp — location:niche IS a fill. Where a term has no levels, or
   where there is no room for a fill (a word inline in a sentence), the
   text format carries it alone.

   An earlier version of this file said "never encode depth in colour."
   That was wrong and it caused real confusion: the graded audience
   columns have always been specificity in colour. Read the rule above
   instead.

   ── DERIVATION ──────────────────────────────────────────────────────────
   Nothing below is invented. Each derived value is either a documented
   transform of a fill or another named step on the same ramp:

     -wash   the fill at 15% alpha        (design-system zone-fill rule)
     -zone   the axis's broadest step     (flat pale container fill)
     -hover  the next lighter named step  (never a new hue)
     -ink    measured, whichever of #1A1A1A / #FFFFFF clears 4.5:1

   All fills are variant B: the framework hues with chroma at each
   family's ceiling and lightness ~4.5 points down.
   ========================================================================== */

:root {

  /* ======================================================================
     MARKET · blues · what they want
     4 levels, broad → specific, named for INTEREST — a more specific
     subject shows more interest in it, and that interest is the intent
     signal. Market is a single column, so the column name is elided and
     the level name follows the axis directly.
     ====================================================================== */
  --dd-market-field:              #9AD1FF;   /* ink dark  · 10.72:1 */
  --dd-market-subject:            #6ABCFF;   /* ink dark  ·  8.50:1 */
  --dd-market-topic:              #2495F1;   /* ink dark  ·  5.51:1 · axis representative */
  --dd-market-type:               #0077D1;   /* ink WHITE ·  4.61:1 */

  --dd-market:                    var(--dd-market-topic);
  --dd-market-wash:               rgba(36, 149, 241, 0.15);
  --dd-market-zone:               var(--dd-market-field);
  --dd-market-hover:              var(--dd-market-subject);
  --dd-market-ink:                #0060AE;   /* small type on white · 6.39:1 */

  /* ======================================================================
     JOURNEY · greens · how ready they are
     7 STAGES — not levels. Journey is the one axis with no levels of
     specificity: a stage narrows nothing, it raises interest in BUYING.
     Later is worth more because it is closer to a purchase, not because
     it is more specific.

     Stages are MUTABLE. Provider words can appear at any time — someone
     can arrive at any stage, in any order. This is a set of labels, not
     a path, so never render it as a required sequence and never add levels
     to it.

     PERCENTAGES are the framework's own conversion figures, arbitrated by
     Matt on 8 Sep 2026 against an earlier, roughly doubled set. They are
     the only non-colour fact in this file and nothing validates them — if
     they grow or gain a second consumer, move them to their own data file
     rather than letting a palette quietly become a metrics source.
     ====================================================================== */
  --dd-journey-information:       #70D377;   /* ink dark  ·  9.34:1 ·  0.1% */
  --dd-journey-problem:           #5ABF60;   /* ink dark  ·  7.51:1 ·  0.5% */
  --dd-journey-solution:          #4CAF50;   /* ink dark  ·  6.26:1 ·  1.0% */
  --dd-journey-process:           #3DA142;   /* ink dark  ·  5.28:1 ·  1.0% */
  --dd-journey-services:          #329839;   /* ink dark  ·  4.71:1 ·  2.0% · axis representative */
  --dd-journey-products:          #148222;   /* ink WHITE ·  4.95:1 ·  2.0% */
  --dd-journey-provider:          #007215;   /* ink WHITE ·  6.14:1 ·  5.0% */

  --dd-journey:                   var(--dd-journey-services);
  --dd-journey-wash:              rgba(50, 152, 57, 0.15);
  --dd-journey-zone:              var(--dd-journey-information);
  --dd-journey-hover:             var(--dd-journey-process);
  --dd-journey-ink:               #007215;   /* small type on white · 6.14:1 */

  /* ======================================================================
     AUDIENCE · reds · who they are
     7 terms, broad → specific. These are TYPES, not depth levels — depth
     is Layer 2. Multipliers are the framework's own.

     Two things that look like mistakes and are not:
       · Industry and Location share #DC2F2F — same tier, same x2 multiplier
       · Career and Internet are NEGATE, not merely weak, so this ramp runs
         strong → neutral → actively excluding
     ====================================================================== */
  --dd-audience-internet:         #FFD6DB;   /* ink dark  · 13.17:1 · Negate */
  --dd-audience-career:           #FFB7BC;   /* ink dark  · 10.57:1 · Negate */
  --dd-audience-level:            #FF7576;   /* ink dark  ·  6.68:1 · x 1.5 */
  --dd-audience-location:         #DC2F2F;   /* ink WHITE ·  4.68:1 · x 2 */
  --dd-audience-industry:         #DC2F2F;   /* ink WHITE ·  4.68:1 · x 2 · shares Location */
  --dd-audience-role:             #D52529;   /* ink WHITE ·  5.09:1 · x 2 · axis representative */
  --dd-audience-brand:            #B31419;   /* ink WHITE ·  6.93:1 · High · deepest red */

  --dd-audience:                  var(--dd-audience-role);
  --dd-audience-wash:             rgba(213, 37, 41, 0.15);
  --dd-audience-zone:             var(--dd-audience-internet);
  --dd-audience-hover:            var(--dd-audience-location);
  --dd-audience-ink:              #B31419;   /* small type on white · 6.93:1 */

  /* ======================================================================
     LEVELS OF SPECIFICITY — audience columns that are graded
     Sector · Segment · Niche · Persona, palest → darkest. The named term
     IS the persona step; the level suffixes step back toward the pale end.
     Written as "location:niche" in prose; --dd-audience-location-niche
     in code. The two are the same fact.

     Each graded column has its OWN ramp — Role, Level and Industry /
     Location do not share intermediates.

     Colour is VALUE, not identity. Two blocks on different columns may
     land on the same fill because they are worth the same; they are told
     apart by which column they sit in. That is correct, not a collision.

     Not every column is graded. Internet, Career and Brand have no levels
     — there is nothing to narrow — so they carry a single fill.

     Band heights are wedges, not equal splits — that is the diagram's
     central idea: Role and Level widen downward 41/86/128/172, while
     Industry and Location narrow downward 170/128/86/43.
     ====================================================================== */
  --dd-audience-role-persona:     var(--dd-audience-role);
  --dd-audience-role-niche:       #F04442;   /* ink dark ·  4.65:1 */
  --dd-audience-role-segment:     #FF696A;   /* ink dark ·  6.20:1 */
  --dd-audience-role-sector:      #FFA0A3;   /* ink dark ·  8.96:1 */

  --dd-audience-level-persona:    var(--dd-audience-level);
  --dd-audience-level-niche:      #FF9193;   /* ink dark ·  8.06:1 */
  --dd-audience-level-segment:    #FFABAF;   /* ink dark ·  9.69:1 */
  --dd-audience-level-sector:     #FFC4C9;   /* ink dark · 11.60:1 */

  --dd-audience-industry-persona: var(--dd-audience-industry);
  --dd-audience-industry-niche:   #FF7F81;   /* ink dark ·  7.13:1 */
  --dd-audience-industry-segment: #FC4F50;   /* ink dark ·  5.28:1 */
  --dd-audience-industry-sector:  #FFABAF;   /* ink dark ·  9.69:1 · same value as level:segment */

  /* Location shares Industry's ramp — same tier, same x2 multiplier, so
     the same values. Aliased rather than repeated so "location:niche" is
     addressable and there is still only one set of numbers. */
  --dd-audience-location-persona: var(--dd-audience-location);
  --dd-audience-location-niche:   var(--dd-audience-industry-niche);
  --dd-audience-location-segment: var(--dd-audience-industry-segment);
  --dd-audience-location-sector:  var(--dd-audience-industry-sector);

  /* ======================================================================
     LAYER 2 · SPECIFICITY IN TEXT FORMAT
     The second channel for value. Four steps, named for what the step
     means rather than numbered. Each axis names its own levels on top:

       market    Field    · Subject · Topic  · Type      (levels of interest)
       audience  Sector   · Segment · Niche  · Persona
       journey   —  stages, not levels. Never use these.

     Use this channel where a fill is unavailable or unwanted: a word
     inline in a sentence, an ungraded column, a print run without solid
     colour. Where a graded fill IS used, the two channels say the same
     thing and must agree.

     Broad reads back visually — "too broad to act on alone" — while
     staying legible.
     ====================================================================== */
  --dd-depth-broad-weight:        400;
  --dd-depth-broad-style:         normal;
  --dd-depth-broad-opacity:       0.62;

  --dd-depth-workable-weight:     400;
  --dd-depth-workable-style:      italic;
  --dd-depth-workable-opacity:    1;

  --dd-depth-targetable-weight:   700;
  --dd-depth-targetable-style:    normal;
  --dd-depth-targetable-opacity:  1;

  --dd-depth-maximum-weight:      700;
  --dd-depth-maximum-style:       italic;
  --dd-depth-maximum-opacity:     1;

  /* ======================================================================
     CLASSIFICATION STATE — how a cell got its value
     Not a fourth axis. This says who classified, not what was classified,
     so it is deliberately a yellow and a dashed grey: neither can be
     mistaken for a family colour.
     ====================================================================== */
  --dd-state-auto:                transparent;              /* >90% · trusted, no marker */
  --dd-state-review:             #FFE81A;                   /* 60-90% · needs a human */
  --dd-state-unclassified-border: 2px dashed #A0A0A0;       /* <60% · unformatted means unclassified */

  /* ======================================================================
     SURFACE — the only non-framework tokens, kept short on purpose
     If this section grows, something has been named wrong above.
     ====================================================================== */
  --dd-surface-ink:               #1A1A1A;   /* display type · the logo wordmark's ink */
  --dd-surface-ink-on-fill:       #1A1A1A;   /* default ink on fills — 11 of 18 */
  --dd-surface-ink-on-fill-inv:   #FFFFFF;   /* the seven listed above */
  --dd-surface-muted:             #6E6A63;   /* 5.38:1 on white · the lockup strapline grey */
  --dd-surface-anchor:            #03445F;   /* 10.52:1 · links and eyebrows */
  --dd-surface-tool-header:       #666666;   /* Sheets chrome, never classification */
  --dd-surface-tool-notes:        #F5F5F5;   /* Sheets chrome, never classification */

  /* Border widths. Previously this file used var(--bw-base, 5px), which
     was defined only in colors_and_type.css — the superseded Tripleniche
     palette. Anything following the current load order silently got the
     5px fallback instead. Tokenised here at that value so the file has
     no external dependency. */
  --dd-border-zone:               5px;       /* dashed zone containers */
}

/* ==========================================================================
   INK — an exception list, not a formula

   Dark #1A1A1A is the default: 11 of the 18 named fills. White on seven:

     #0077D1  market Type          4.61:1
     #148222  journey Products     4.95:1
     #007215  journey Provider     6.14:1
     #DC2F2F  audience Location    4.68:1
     #DC2F2F  audience Industry    4.68:1
     #D52529  audience Role        5.09:1
     #B31419  audience Brand       6.93:1

   Do NOT restate this as "white on the N darkest steps" or as an OKLCH
   lightness threshold. Both have been tried in earlier versions of this
   file and both were wrong — the ramps differ in length, so the counts
   differ per axis. Read it off the list.

   Three fills were nudged 1-2.5 lightness points off the plain variant-B
   transform because at their computed value neither ink reached 4.5:1:
     #0077D1  Type              (darker  1.0pp)
     #329839  Services          (lighter 1.5pp)
     #DC2F2F  Industry/Location (darker  2.5pp)

   For coloured TYPE on white use only --dd-<axis>-ink or
   --dd-surface-anchor. The fills are backgrounds.
   ========================================================================== */

/* Layer 2 helpers — apply alongside any Layer 1 fill.
   These CONSUME the tokens above rather than restating them, so there is
   only ever one account of each value. Every helper sets all three
   properties, including opacity, so applying one inside a broad container
   resets the fade instead of inheriting it. */
.dd-broad {
  font-weight: var(--dd-depth-broad-weight);
  font-style:  var(--dd-depth-broad-style);
  opacity:     var(--dd-depth-broad-opacity);
}
.dd-workable {
  font-weight: var(--dd-depth-workable-weight);
  font-style:  var(--dd-depth-workable-style);
  opacity:     var(--dd-depth-workable-opacity);
}
.dd-targetable {
  font-weight: var(--dd-depth-targetable-weight);
  font-style:  var(--dd-depth-targetable-style);
  opacity:     var(--dd-depth-targetable-opacity);
}
.dd-maximum {
  font-weight: var(--dd-depth-maximum-weight);
  font-style:  var(--dd-depth-maximum-style);
  opacity:     var(--dd-depth-maximum-opacity);
}

/* Zone containers — dashed border in the axis colour over its own wash */
.dd-zone            { border: var(--dd-border-zone) dashed currentColor; }
.dd-zone--market    { color: var(--dd-market);   background: var(--dd-market-wash); }
.dd-zone--journey   { color: var(--dd-journey);  background: var(--dd-journey-wash); }
.dd-zone--audience  { color: var(--dd-audience); background: var(--dd-audience-wash); }
