/* LeapCode Wave 2e: Registry colour tokens (DR-21, "the Registry wins"). KZ approved Option A, Registry rebuild (W-32).
   Source: Cosmos Leap Registry v6.29.1, sheets 11_Node_Database (J55-J68) and 20_Colour_Philosophy (E34:K38).
   Replaces: off-Registry unit tints (W-11, W-13) and the Trust gold #C8962C (W-10 -> stone, the Unbound neutral ladder).
   Light is the default. Dark applies with <html data-theme="dark"> (the site is light-only today; same opt-in as tokens.css).
   Text pairs are checked >= 4.5:1 (accent on its own ground and strong accent on its own ground). DERIVED = tint of a Registry step mixed with white. */

:root {
  /* ---- Lens ladders W1..W5 + container + framework (Registry) ---- */
  --reg-legacy-1:#A3C9ED; --reg-legacy-2:#74AADE; --reg-legacy-3:#488ECE; --reg-legacy-4:#136AAC; --reg-legacy-5:#024A7E; --reg-legacy-c:#012D4F; --reg-legacy-f:#03192E;
  --reg-evolution-1:#ECB4B1; --reg-evolution-2:#DA8D89; --reg-evolution-3:#C76967; --reg-evolution-4:#A34243; --reg-evolution-5:#7A272A; --reg-evolution-c:#4D1517; --reg-evolution-f:#2B0D0D;
  --reg-abundance-1:#9AD2BD; --reg-abundance-2:#61B89B; --reg-abundance-3:#19A07E; --reg-abundance-4:#05785D; --reg-abundance-5:#015541; --reg-abundance-c:#013427; --reg-abundance-f:#001E15;
  --reg-process-1:#C2C2D6; --reg-process-2:#A2A3B6; --reg-process-3:#87879A; --reg-process-4:#646476; --reg-process-5:#464657; --reg-process-c:#2A2939; --reg-process-f:#171625;
  --reg-stone-1:#CDC2B5; --reg-stone-2:#ADA396; --reg-stone-3:#91887B; --reg-stone-4:#6E6558; --reg-stone-5:#4F463B; --reg-stone-c:#322A1F; --reg-stone-f:#1E170D;

  /* ---- Lens anchors (J55-J58) ---- */
  --reg-legacy:#1A6DAF; --reg-evolution:#CC4449; --reg-abundance:#11B890; --reg-process:#3D3D4A;

  /* ---- Units (W-11): hue = the unit's Registry lens, as on leapos.json ---- */
  --unit-foundation:#CC4449;   --unit-foundation-text:#A34243;   /* Evolution anchor; W4 for text */
  --unit-revenue:#11B890;      --unit-revenue-text:#05785D;      /* Abundance anchor; W4 for text */
  --unit-delivery:#1A6DAF;     --unit-delivery-text:#136AAC;     /* Legacy anchor; W4 for text */
  --unit-crew:#CC4449;         --unit-crew-text:#A34243;         /* Evolution anchor; W4 for text (Crew & Culture Unit) */
  --unit-technology:#3D3D4A;   --unit-technology-text:#646476;   /* Process anchor; W4 */
  --unit-compliance:#3D3D4A;   --unit-compliance-text:#646476;   /* Process anchor; W4 */
  /* Momentum Check light-surface step per unit (W-13), replaces #3F8CD0 #E8787B #7F7F9C #9A9AB2 */
  --unit-foundation-soft:var(--reg-evolution-2);  --unit-revenue-soft:var(--reg-abundance-2);  --unit-delivery-soft:var(--reg-legacy-3);
  --unit-crew-soft:var(--reg-evolution-2);        --unit-technology-soft:var(--reg-process-3); --unit-compliance-soft:var(--reg-process-2);
  /* Momentum Check dark-surface step per unit (W-13), replaces #A33338 #0B8064 #B8484B #55556E #6A6A84 */
  --unit-foundation-deep:var(--reg-evolution-4);  --unit-revenue-deep:var(--reg-abundance-4);  --unit-delivery-deep:var(--reg-legacy-4);
  --unit-crew-deep:var(--reg-evolution-4);        --unit-technology-deep:var(--reg-process-4); --unit-compliance-deep:var(--reg-process-4);

  /* ---- SOCIETY(TM) stages tj1..tj7 (F-025, 11_Node_Database J59-J68). Darker = more mature ---- */
  --stage-setup:#ECB4B1; --stage-standardize:#DF9895; --stage-optimize:#D27D7A; --stage-scale:#C16361;
  --stage-integrate:#AC4C4C; --stage-ecosystem:#943839; --stage-transcend:#7A272A;
  /* 321 Leap(TM) "3. Pilot": Registry v6.29.2 {es5} (W-12), midpoint of tj1 and tj2. */
  --stage-pilot:#E5A6A3;

  /* ---- Trust = stone (W-10). Replaces gold #C8962C / #8E6A1D / #D9A83F in the Trust section ---- */
  --trust-edge:var(--reg-stone-3); --trust-text:var(--reg-stone-4); --trust-text-strong:var(--reg-stone-5);

  /* ---- Section grounds (LR-15 Option A, Registry rebuild). soft, deep, accent, strong accent, pattern line, text ---- */
  --sec-hero-s:#2A2939;    --sec-hero-d:#171625;    --sec-hero-a:#ECB4B1;    --sec-hero-as:#ECB4B1;    --sec-hero-p:#3D3C4C;    --sec-hero-fg:#F2F4F4;
  --sec-problem-s:#FBF0EF; --sec-problem-d:#F8E4E3; --sec-problem-a:#A34243; --sec-problem-as:#7A272A; --sec-problem-p:#E8CAC9; --sec-problem-fg:#1A1A1A;
  --sec-solution-s:#EBF6F2;--sec-solution-d:#DBEFE7;--sec-solution-a:#05785D;--sec-solution-as:#015541;--sec-solution-p:#B8DAD1;--sec-solution-fg:#1A1A1A;
  --sec-proof-s:#EDF4FB;   --sec-proof-d:#DEECF9;   --sec-proof-a:#136AAC;   --sec-proof-as:#024A7E;   --sec-proof-p:#BDD6EA;   --sec-proof-fg:#1A1A1A;
  --sec-trust-s:#F5F3F0;   --sec-trust-d:#EDE9E4;   --sec-trust-a:#6E6558;   --sec-trust-as:#4F463B;   --sec-trust-p:#D7D4CF;   --sec-trust-fg:#1A1A1A;
  --sec-faq-s:#F3F3F7;     --sec-faq-d:#EBEBF2;     --sec-faq-a:#464657;     --sec-faq-as:#464657;     --sec-faq-p:#D4D4DB;     --sec-faq-fg:#1A1A1A;
}

:root[data-theme="dark"] {
  --sec-hero-s:#2A2939;    --sec-hero-d:#171625;    --sec-hero-a:#ECB4B1;    --sec-hero-as:#ECB4B1;    --sec-hero-p:#2D2D3C;    --sec-hero-fg:#F2F4F4;
  --sec-problem-s:#2B0D0D; --sec-problem-d:#4D1517; --sec-problem-a:#ECB4B1; --sec-problem-as:#ECB4B1; --sec-problem-p:#471E1D; --sec-problem-fg:#F2F4F4;
  --sec-solution-s:#001E15;--sec-solution-d:#013427;--sec-solution-a:#61B89B;--sec-solution-as:#61B89B;--sec-solution-p:#043528;--sec-solution-fg:#F2F4F4;
  --sec-proof-s:#03192E;   --sec-proof-d:#012D4F;   --sec-proof-a:#74AADE;   --sec-proof-as:#74AADE;   --sec-proof-p:#0F2E4B;   --sec-proof-fg:#F2F4F4;
  --sec-trust-s:#1E170D;   --sec-trust-d:#322A1F;   --sec-trust-a:#ADA396;   --sec-trust-as:#ADA396;   --sec-trust-p:#332B21;   --sec-trust-fg:#F2F4F4;
  --sec-faq-s:#2A2939;     --sec-faq-d:#171625;     --sec-faq-a:#A2A3B6;     --sec-faq-as:#A2A3B6;     --sec-faq-p:#3B3A4A;     --sec-faq-fg:#F2F4F4;
  --trust-edge:var(--reg-stone-2); --trust-text:var(--reg-stone-2); --trust-text-strong:var(--reg-stone-1);
}

/* Section scopes: <section class="lc-sec lc-sec--proof">. Children read --lc-acc, --lc-acc-strong, --lc-fg, --lc-line. */
.lc-sec { color:var(--lc-fg); background:var(--lc-bg); padding-block:var(--s-7,48px); }
.lc-sec--hero    { --lc-s:var(--sec-hero-s);    --lc-d:var(--sec-hero-d);    --lc-acc:var(--sec-hero-a);    --lc-acc-strong:var(--sec-hero-as);    --lc-line:var(--sec-hero-p);    --lc-fg:var(--sec-hero-fg); }
.lc-sec--problem { --lc-s:var(--sec-problem-s); --lc-d:var(--sec-problem-d); --lc-acc:var(--sec-problem-a); --lc-acc-strong:var(--sec-problem-as); --lc-line:var(--sec-problem-p); --lc-fg:var(--sec-problem-fg); }
.lc-sec--solution{ --lc-s:var(--sec-solution-s);--lc-d:var(--sec-solution-d);--lc-acc:var(--sec-solution-a);--lc-acc-strong:var(--sec-solution-as);--lc-line:var(--sec-solution-p);--lc-fg:var(--sec-solution-fg); }
.lc-sec--proof   { --lc-s:var(--sec-proof-s);   --lc-d:var(--sec-proof-d);   --lc-acc:var(--sec-proof-a);   --lc-acc-strong:var(--sec-proof-as);   --lc-line:var(--sec-proof-p);   --lc-fg:var(--sec-proof-fg); }
.lc-sec--trust   { --lc-s:var(--sec-trust-s);   --lc-d:var(--sec-trust-d);   --lc-acc:var(--sec-trust-a);   --lc-acc-strong:var(--sec-trust-as);   --lc-line:var(--sec-trust-p);   --lc-fg:var(--sec-trust-fg); }
.lc-sec--faq     { --lc-s:var(--sec-faq-s);     --lc-d:var(--sec-faq-d);     --lc-acc:var(--sec-faq-a);     --lc-acc-strong:var(--sec-faq-as);     --lc-line:var(--sec-faq-p);     --lc-fg:var(--sec-faq-fg); }
.lc-sec { --lc-bg:linear-gradient(180deg,var(--lc-s),var(--lc-d)); }
