/*
 R2 publication cleanup overrides.
 Load after styles.css, r1-polish.css, and r2-site.css.
 Purpose: improve text contrast without changing doctrine or structural styling.
*/

:root {
  --r2-text-primary: #F4F7FB;
  --r2-text-body: #D6DFEA;
  --r2-text-muted: #B5C1CF;
}

/* Dark-background copy: raise body and supporting-text contrast. */
.section--hero .hero-copy,
.section--authority .section-intro,
.section--authority .chain-node small,
.section--authority .debt-rail span,
.section--authority .actor-panel,
.section--stories .section-intro,
.section--stories .story-card p,
.pd-evidence-bridge p,
.pd-practitioner-quote p {
  color: var(--r2-text-body) !important;
}

.section--hero .eyebrow,
.section--authority .section-label,
.section--stories .section-label,
.pd-practitioner-quote cite,
.pd-practitioner-quote cite a,
.pd-story-card-tags,
.chain-node .node-code {
  color: var(--r2-text-muted) !important;
}

.section--hero h1,
.section--authority h2,
.section--authority .chain-node strong,
.section--authority .debt-rail strong,
.section--stories h2,
.section--stories .story-card h3,
.pd-evidence-bridge h3 {
  color: var(--r2-text-primary) !important;
}

/* Quotes remain readable in default, hover, and expanded states. */
.pd-practitioner-quote,
.pd-practitioner-quote:hover,
.pd-practitioner-quote:focus-within {
  opacity: 1 !important;
}

.pd-practitioner-quote cite a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Preserve legibility for interactive controls against dark sections. */
.section--authority .actor-tab:not(.is-active),
.section--stories .text-link,
.pd-evidence-bridge a {
  color: var(--r2-text-body) !important;
}

/* Do not use the lowest-contrast text token for ordinary body copy. */
.section-intro--light {
  color: var(--r2-text-body) !important;
}

@media (prefers-contrast: more) {
  :root {
    --r2-text-body: #EDF2F7;
    --r2-text-muted: #D4DCE6;
  }
}


/* R2 live-QA corrections: semantic light-card foregrounds. */
.section--authority .chain-node--ea,
.section--authority .chain-node--ea strong,
.section--authority .chain-node--ea small,
.section--authority .chain-node--ea .node-code {
  color: #102039 !important;
}
.section--authority .chain-node--ea .node-code {
  color: #173A63 !important;
}

.section--authority .debt-rail,
.section--authority .debt-rail strong,
.section--authority .debt-rail span,
.section--authority .debt-rail .debt-flow {
  color: #172033 !important;
}

/* Brighter taxonomy labels on dark actor detail cards. */
.section--authority .actor-panel b {
  color: #57E6FF !important;
}
.section--authority .actor-panel span {
  color: #F1F5FA !important;
}

/* New Defender Intelligence homepage bridge. */
.pd-defender-bridge {
  margin: 26px 0;
  padding: 24px;
  border: 1px solid rgba(87,230,255,.34);
  border-radius: 16px;
  background: rgba(10,28,57,.34);
}
.pd-defender-bridge .k {
  color: #57E6FF;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pd-defender-bridge h3 {
  color: #F4F7FB !important;
  margin: 10px 0 8px;
}
.pd-defender-bridge p {
  color: #D6DFEA !important;
  line-height: 1.55;
}
.pd-defender-bridge a {
  color: #57E6FF !important;
  font-weight: 850;
  text-underline-offset: .2em;
}
