/**
 * PAP theme — Atlas wearing the Pan-African Parliament palette.
 * An organ theme of the design system: built to dist/themes/pap.css
 * (scripts/build-themes.mjs) and loaded AFTER dist/atlas.css by a PAP page.
 *
 * This file redeclares TOKENS ONLY. Not one component rule is overridden and
 * not one class is redefined: if a PAP page needs a control Atlas does not
 * have, that is a gap in Atlas, not a licence to write CSS here. The whole
 * point of the organ folders is that PAP, ECOSOCC and ECHO are the same
 * system with different values — the moment this file grows selectors, they
 * have become three systems again.
 *
 * GREEN IS THE AU'S, NOT PAP'S OWN [owner 2026-09-24]. It used to be
 * #2D7D46, lifted with the rest of this palette from the members portal's
 * Tailwind config (utils/pap-members-portal/index.html) — a mock-up, not a
 * brand source. ECOSOCC carries the AU green, #1A5632, straight from the
 * generated AU tokens, and the two organs were sitting side by side in
 * different greens. PAP now stops overriding it: the accent is not restated
 * here at all, so it resolves to the same AU token ECOSOCC uses and cannot
 * drift from it again.
 *
 * The red and the gold below still come from that Tailwind config and have
 * not been checked against a PAP brand source.
 *
 * SINGLE ACCENT holds here exactly as it does on ECOSOCC. Green is the accent.
 * The maroon is a GROUND — one full-bleed band a page, never a second accent —
 * and the gold stays parked, as it is system-wide. The portal today runs green
 * nav + gold underline + maroon wordmark all in one bar; that does not carry
 * over.
 *
 * The tint ramps are DERIVED from the accent with color-mix at the same
 * proportions the Atlas ramp uses (11% / 7% / 3.5% on the canvas, measured off
 * the generated AU tokens), so re-pointing one hue moves its whole ramp with
 * it instead of leaving five hand-picked tints behind.
 */
:root {
  /* brand */
  --atlas-color-primary: var(--atlas-color-background-green-accent);
  --atlas-green: var(--atlas-color-background-green-accent);
  --atlas-red: oklch(0.395664 0.126545 5.230408);
  --atlas-gold: oklch(0.651233 0.104004 84.541022);

  /* accents — what the palette layer actually reads */
  --atlas-color-background-red-accent: oklch(0.395664 0.126545 5.230408);
  --atlas-color-background-gold-accent: oklch(0.651233 0.104004 84.541022);

  /* green ramp, derived from the accent above */
  --atlas-color-background-green-muted:    color-mix(in srgb, var(--atlas-green) 45%, oklch(1 0 0));
  --atlas-color-background-green-soft:     color-mix(in srgb, var(--atlas-green) 22%, oklch(1 0 0));
  --atlas-color-background-green-subtle:   color-mix(in srgb, var(--atlas-green) 11%, oklch(1 0 0));
  --atlas-color-background-green-delicate: color-mix(in srgb, var(--atlas-green) 7%,  oklch(1 0 0));
  --atlas-color-background-green-faint:    color-mix(in srgb, var(--atlas-green) 3.5%, oklch(1 0 0));

  /* maroon ramp, same treatment */
  --atlas-color-background-red-muted:      color-mix(in srgb, var(--atlas-red) 55%, oklch(1 0 0));
  --atlas-color-background-red-soft:       color-mix(in srgb, var(--atlas-red) 22%, oklch(1 0 0));
  --atlas-color-background-red-subtle:     color-mix(in srgb, var(--atlas-red) 11%, oklch(1 0 0));
  --atlas-color-background-red-delicate:   color-mix(in srgb, var(--atlas-red) 7%,  oklch(1 0 0));
  --atlas-color-background-red-faint:      color-mix(in srgb, var(--atlas-red) 3.5%, oklch(1 0 0));
}
@supports not (color: oklch(0% 0 0)) {
  :root {
  --atlas-red: #7a1f3d;
  --atlas-gold: #ad8a3d;
  --atlas-color-background-red-accent: #7a1f3d;
  --atlas-color-background-gold-accent: #ad8a3d;
  }
}

/* DARK. The accents are FOREGROUND tokens in dark — Atlas lightens them so
   text keeps its contrast on the dark canvas (see the note in global-nav.css
   about the one place the maroon is used as a fill). PAP's greens and maroon
   are darker than the AU pair, so they need more lift, not less. */
[data-theme='dark'], .atlas-dark {
  --atlas-color-background-red-accent: oklch(0.721539 0.100765 359.462756);
  --atlas-color-background-gold-accent: oklch(0.83672 0.048725 91.352264);
  --atlas-color-background-green-soft:     oklch(0.268989 0.025386 156.089686);
  --atlas-color-background-green-subtle:   oklch(0.301616 0.023684 159.533405);
  --atlas-color-background-green-delicate: oklch(0.329222 0.02326 159.757666);
  --atlas-color-background-green-faint:    oklch(0.374876 0.026329 147.112197);
  --atlas-color-background-red-soft:       oklch(0.242785 0.020081 356.866718);
  --atlas-color-background-red-subtle:     oklch(0.270685 0.023006 355.471538);
  --atlas-color-background-red-delicate:   oklch(0.296221 0.023873 356.809921);
  --atlas-color-background-red-faint:      oklch(0.365448 0.050685 2.711329);
}
@supports not (color: oklch(0% 0 0)) {
  [data-theme='dark'], .atlas-dark {
  --atlas-color-background-red-accent: #d98aa3;
  --atlas-color-background-gold-accent: #d5c9a6;
  --atlas-color-background-green-soft:     #1c2a21;
  --atlas-color-background-green-subtle:   #24322a;
  --atlas-color-background-green-delicate: #2b3931;
  --atlas-color-background-green-faint:    #384539;
  --atlas-color-background-red-soft:       #281c20;
  --atlas-color-background-red-subtle:     #302227;
  --atlas-color-background-red-delicate:   #37282d;
  --atlas-color-background-red-faint:      #55333c;
  }
}
