/* ═══════════════════════════════════════════
   MODULE 3 — Kinetics & Equilibrium · palette
   ═══════════════════════════════════════════

   Loaded AFTER tokens.css and overrides colour only. Structure, the type
   scale, layout and motion all stay shared — a module is its own world in how
   it looks, not in how it is built.

   Module 1 is warm: cream paper, gold accent, a room with a lamp on. Module 2
   is cool, the light of a laboratory. This one is sage — the module is about
   rate, balance and the point at which two opposing changes cancel, and green
   is the one accent on the identity board that reads as a system settling
   rather than a measurement being taken. It is the same sage the platform
   already gives Module 3 on the home page, so walking from the card into the
   module keeps its colour.

   EVERY VALUE HERE WAS MEASURED, NOT PICKED.
   Light theme on --paper: --ink 16.87:1, --ink2 10.56:1, --ink3 5.74:1,
   --gold 6.36:1, --gold2 4.90:1. Dark theme on --paper: 16.37, 7.16, 8.87,
   7.68. The sidebar figures are below, beside the tokens they belong to.

   A NOTE ON THE TOKEN NAMES

   `--gold*` holds sage green here, and that reads wrong. The names date from
   when there was one module and the accent really was gold. Renaming them to
   `--accent*` is 150 sites across four stylesheets and is the right fix; it is
   still a separate decision rather than something folded into a theme file.
   Until then: `--gold` is "the accent that is safe as text", `--gold-ui` is
   "the decorative accent", regardless of hue.  */

[data-module="3"] {
  /* ── Ink / surface (light) ── */
  --ink:       #121a14;
  --ink2:      #313f34;   /* ALSO the sidebar ground in the light theme */
  --ink3:      #59665c;   /* AA on --paper — measured, not guessed */
  --cream:     #eef3ee;
  --cream2:    #e4ebe4;
  --cream3:    #d3ddd4;

  /* The sidebar is a fixed dark surface in BOTH themes, so these three hold
     one value each and are themed here like everything else. Without the
     override a sage module wears Module 1's gold in every hover, focus ring
     and active pill — which is exactly how Module 2 shipped gold once.
     Measured on the sidebar: 5.23:1 light, 9.38:1 dark, and 7.11:1 on an
     active nav pill. */

  --accent-rgb: 143,189,151;
  --gold-on-dark: #8fbd97;
  --ink-on-dark:  #a9b2ab;

  /* ── the mind map's four branch hues ──
     The mind map is a DARK panel in both themes, like the sidebar and the
     formula box, so the categorical colours cannot be used on it: --rust,
     --teal and --emerald are calibrated for the cream page and measure
     1.53-2.02:1 there, which is invisible. These four are the dark-theme
     values, held constant in BOTH themes because the surface is. Measured on
     the panel: 4.6:1 at worst, 9.97:1 at best, across all three modules. */
  --mm-1: #8fbd97;  --mm-2: #e0966f;  --mm-3: #6bb0d1;  --mm-4: #6cc79c;

  /* ── Accents ──
     --gold is text-safe on light; --gold-ui is decorative only. The split is
     the same one Module 1 makes, and for the same reason: one green cannot be
     both readable as body text and bright enough for a rule. */
  --gold:      #2f6742;   /* text-safe sage */
  --gold-ui:   #6B8F71;   /* the platform's Module 3 accent, exactly */
  --gold2:     #3a7a50;
  --gold3:     #7fae8a;

  /* Categorical, for the dashboard cards. Shifted off Module 1's and
     Module 2's sets so they stay distinguishable beside a green brand accent
     — a card-emerald identical to the accent would flatten the grid. */
  --rust:      #9d5230;
  --teal:      #2b6a80;
  --emerald:   #1f6b52;

  /* ── Surfaces ── */
  --paper:     #f7faf7;
  --card-bg:   #ffffff;
  --hero-bg:   #ecf2ec;
  --main-bg:   #f7faf7;
  --section-bg:#ffffff;
  --quiz-bg:   #151f17;

  /* ── Lines / shadow ── green-tinted to match the ground ── */
  --line:      rgba(18,26,20,0.14);
  --line2:     rgba(18,26,20,0.07);
  --shadow:    0 1px 2px rgba(18,26,20,0.05), 0 4px 14px rgba(18,26,20,0.06);
  --shadow2:   0 4px 12px rgba(18,26,20,0.09), 0 18px 48px rgba(18,26,20,0.13);
}

/* Dark is art-directed, never an inversion: light-on-dark accents need
   RAISING or they sink into the ground. Same rule Modules 1 and 2 follow. */
[data-theme="dark"][data-module="3"] {
  --ink:       #e9f0ea;
  --ink2:      #c4cec6;
  --ink3:      #93a396;   /* AA on dark --paper */
  --cream:     #101710;
  --cream2:    #18211a;
  --cream3:    #242f26;

  --gold:      #8bbd95;   /* raised for light-on-dark */
  --gold-ui:   #6a9b74;
  --gold2:     #7cb187;
  --gold3:     #a9d3b0;

  --rust:      #e0966f;
  --teal:      #6bb0d1;
  --emerald:   #6cc79c;

  --paper:     #0b120d;
  --card-bg:   #141d16;
  --hero-bg:   #101811;
  --main-bg:   #0b120d;
  --section-bg:#131c15;
  --quiz-bg:   #070d08;

  --line:      rgba(233,240,234,0.13);
  --line2:     rgba(233,240,234,0.07);
  --shadow:    0 1px 2px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.3);
  --shadow2:   0 4px 12px rgba(0,0,0,0.45), 0 18px 48px rgba(0,0,0,0.55);
}
