/* Distributed Management semantic theme bridge.
   Existing geometry/motion remains page-owned; materials derive from Cybereum.

   Selectors repeat their class on purpose — do not "simplify" them. This file
   is injected by site-theme.js during head parsing, so it lands BEFORE the
   page's own <link> to distributed-management.css, which appears later in the
   document. At equal specificity the later sheet wins, so every single-class
   rule here lost to the page's hard-coded dark values.

   That was not theoretical. Text colours switched with the theme, because they
   inherit through the --dm-* properties set on .dm-main and inheritance does
   not care about sheet order, while section backgrounds stayed dark. In light
   theme .dm-section--deep rendered #050b13 under #173147 body copy, and the
   bolded lead-in of .dm-market__principle was effectively invisible.

   Repeating the class lifts each rule to (0,2,0) so the bridge wins regardless
   of load order. This is the same idiom surface-art-direction.css already uses
   (.dycore.dycore, .frame.frame, .grid.grid). */
.dm-main.dm-main{
  --dm-bg:var(--cyb-page-bg);
  --dm-panel:var(--cyb-panel-solid);
  --dm-line:var(--cyb-panel-border);
  --dm-cyan:var(--cyb-signal-primary);
  --dm-cyan2:var(--cyb-signal-secondary);
  --dm-text:var(--cyb-text);
  --dm-muted:var(--cyb-text-muted);
  --dm-dim:var(--cyb-text-dim);
  background:var(--cyb-page-bg);
  color:var(--cyb-text);
}
.dm-section.dm-section{border-top-color:var(--cyb-panel-border)}
.dm-section--soft.dm-section--soft{background:var(--cyb-section-soft)}
.dm-section--deep.dm-section--deep{background:var(--cyb-section-deep)}
.dm-thesis__signal.dm-thesis__signal,
.dm-commitment.dm-commitment,
.dm-market__center.dm-market__center,
.dm-thesis__core.dm-thesis__core{
  border-color:var(--cyb-panel-border);
  background:var(--cyb-instrument-bg);
  box-shadow:var(--cyb-shadow-1);
}
.dm-thesis__signal.dm-thesis__signal::before{
  background-image:linear-gradient(var(--cyb-grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--cyb-grid-line) 1px,transparent 1px);
}
.dm-thesis__signal.dm-thesis__signal::after,.dm-market__ring.dm-market__ring,.dm-market__ring.dm-market__ring::before{border-color:var(--cyb-orbit-line)}
.dm-thesis__core.dm-thesis__core,.dm-market__center.dm-market__center{box-shadow:0 0 60px var(--cyb-instrument-glow)}
.dm-operating.dm-operating{border-block-color:var(--cyb-panel-border)}
.dm-operating.dm-operating article+article{border-left-color:var(--cyb-panel-border)}
.dm-title.dm-title,.dm-operating.dm-operating h3{color:var(--cyb-text)}
.dm-lede.dm-lede,.dm-operating.dm-operating p,.dm-commitment__step.dm-commitment__step small,.dm-thesis__node.dm-thesis__node,.dm-thesis__core.dm-thesis__core small{color:var(--cyb-text-muted)}
.dm-kicker.dm-kicker,.dm-title.dm-title span,.dm-thesis__node.dm-thesis__node::before,.dm-commitment__arrow.dm-commitment__arrow{color:var(--cyb-signal-primary)}
.dm-thesis__line.dm-thesis__line{background:linear-gradient(90deg,color-mix(in srgb,var(--cyb-signal-primary) 34%,transparent),transparent)}

/* Two surfaces kept their dark paint as literals and so never crossed the
   bridge. The caveat is the worst of them: rgba(9,22,34,.45) over a near-white
   page composites to rgb(142,149,155), and --dm-dim on that grey measured
   1.62:1 — the least readable text on the site, carrying the one paragraph
   that says the network and economic layers are direction rather than
   deployed product. Its bolded lead-in measured 4.37:1, also under AA.

   The first horizon card's tint is the same mistake at lower amplitude: a
   fixed cyan wash that reads as a highlight on dark and drags the card's
   label to 3.99:1 on light. Expressed as a mix of the signal colour, it
   stays a highlight in both. */
.dm-caveat.dm-caveat{
  border-color:var(--cyb-panel-border);
  background:var(--cyb-surface-subtle);
}
.dm-horizons.dm-horizons article:first-child{
  background:linear-gradient(180deg,color-mix(in srgb,var(--cyb-signal-primary) 7%,var(--cyb-page-bg)),var(--cyb-page-bg));
}

/* --cyb-text-dim is the quiet tier, and in light theme it clears AA on the
   page background by a hair: 4.59:1 against 4.5 needed for a 9.92px label.
   Any tint at all spends that margin, so the highlighted card's own label
   was the one text on the card that failed — 3.58:1 measured off the pixels.
   The tint is what makes the card read as current capability, so the label
   moves up a tier instead. Dark has six points of headroom and keeps the
   quiet tier, which is what holds the kicker below the card title there. */
:root[data-theme="light"] .dm-horizons.dm-horizons em{color:var(--cyb-text-muted)}

/* The sunrise is deliberately cinematic. It owns a complete nested dark scheme
   and therefore stays legible even when the surrounding narrative is light. */
.dm-hero.cyb-scheme-dark{
  background:linear-gradient(180deg,#020711,#061321 58%,#0b2232 78%,#151b20);
  color:var(--cyb-fg);
}
