/* ============================================================
   Entelligencia · shared contrast rule
   The Next Hotspot · added 29 July 2026

   Root cause: house gold #C8A96E on cream #F4EFE6 is 1.76:1.
   The pattern proven on Europe was #7A5310 for gold text on
   light grounds and lighter status colours on dark. This lifts
   that pattern into one shared rule for every page.

   METHOD. Every selector below was audited at render time against
   its composited ground, alpha included, across fourteen pages.
   Only selectors that appear on ONE ground are overridden here,
   so the rule cannot regress the other. Do not move a selector
   between blocks, or add one, without re-running the audit.

   KNOWN REMAINDER. A small set of utilities are used on both
   grounds and therefore cannot be fixed by a colour override:
     .u-gold  .num  .wnlid__h  .wnlid__eb  .sec__take-k
     .section__eb-text  .gist__hint  .rail__lbl
   These need a ground modifier at the point of use, for example
   .u-gold--on-dark. That is a design-system change, not a CSS
   patch, and is logged rather than bodged here.
   ============================================================ */

:root{
  /* darken · text on cream #F4EFE6 */
  --gold-on-light:   #7A5310;   /* 5.97:1 */
  --forest-on-light: #1B4332;   /* 9.68:1 */
  --grey-on-light:   #5A5A5A;   /* 6.02:1 */
  --sand-on-light:   #6E6552;   /* 5.03:1 */
  /* lighten · text on forest #081C16 */
  --sage-on-dark:    #A8B5AE;
  --green-on-dark:   #7FB0A2;
  --gold-on-dark:    #C8A96E;
}

/* ============================================================
   BLOCK 1 · LIGHT GROUNDS ONLY · darken
   ============================================================ */

.cblock__eb, .cblock__pv-eb,
.mani__n, .mani__g--a,
.fig__eb, .overview__eb-text{
  color: var(--gold-on-light) !important;
}

.cblock em, .overview em, .fig em, .mdx__block em{
  color: var(--gold-on-light) !important;
}

.cblock__sig, .fig__src, .overview__sig,
.wildnote, .split__lab, .split__sub,
.adoc__head-sub, .docstack__hint{
  color: var(--grey-on-light) !important;
}

.adoc__ln-n{ color: var(--sand-on-light) !important; }

.mdx__block a, .cblock a, .fig a{ color: var(--gold-on-light) !important; }

/* ============================================================
   BLOCK 2 · DARK GROUNDS ONLY · lighten
   ============================================================ */

.person__field-label, .person__quote-source,
.oprt__cap, .cabmin__seat, .board__exhibit__open,
.mod__cap2, .ena__rail-label, .ena__step-n, .ena__step-meta,
.docstack__tab-m, .rtsec__foot, .rtsec__id{
  color: var(--sage-on-dark) !important;
}

.ldg-card__claim, .intro__g--v{ color: var(--green-on-dark) !important; }

.mod__k{ color: var(--gold-on-dark) !important; }

/* decorative index numeral, raised from .16 so it is legible
   without becoming a competing headline */
.cns-panel__ix{ opacity:.42 !important; }

/* ============================================================
   Horizontal overflow at small viewports
   Three pages pushed the document 4px wider than the viewport
   at 390px: two election charts and one scrollytelling scene.
   Wide instruments scroll inside their own container rather
   than pushing the page. Scoped to small screens only, so
   desktop layout is untouched.
   ============================================================ */
@media (max-width: 760px){
  .nc__chart, .esc__chart{
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }
  .nc__chart > svg, .esc__chart > svg{ max-width:none; }
  .cks__scene-img, .lacard{ max-width:100% !important; }
  html, body{ overflow-x:hidden; }
}
