/*
  Readability orchestration
  - deterministic per-section token ownership
  - keeps module-local CSS modular
  - avoids broad repaint rules that cause contrast regressions
*/

.page-home .content-section {
  --section-heading: rgba(4, 50, 72, 0.998);
  --section-text: rgba(7, 60, 86, 0.994);
  --section-muted: rgba(28, 77, 102, 0.955);
  --section-link: rgba(6, 84, 118, 0.99);
  --section-chip-bg: rgba(12, 94, 126, 0.14);
  --section-chip-border: rgba(10, 83, 114, 0.34);
  --section-chip-text: rgba(6, 62, 87, 0.998);
}

.page-home .content-section[data-tone-hint="dark"],
.page-home .content-section[data-tone="ink"] {
  --section-heading: rgba(247, 254, 255, 0.998);
  --section-text: rgba(240, 251, 255, 0.995);
  --section-muted: rgba(221, 242, 250, 0.98);
  --section-link: rgba(221, 245, 255, 0.99);
  --section-chip-bg: rgba(7, 64, 92, 0.86);
  --section-chip-border: rgba(198, 241, 255, 0.58);
  --section-chip-text: rgba(241, 251, 255, 0.998);
}

/* Palette-locked modules always use module tokens regardless of inherited section color. */
.page-home .content-section[data-smart-palette-lock="1"] :is(h1, h2, h3, h4, .badge) {
  color: var(--module-heading, var(--section-heading));
}

.page-home .content-section[data-smart-palette-lock="1"] :is(p, li, .lead, .showcase-body, .path-subtitle, .spotlight-body) {
  color: var(--module-text, var(--section-text));
}

/* Dark command surfaces */
.page-home .hero-story,
.page-home .constellation,
.page-home .cta-band {
  --module-heading: rgba(248, 253, 255, 0.998);
  --module-text: rgba(236, 248, 254, 0.995);
  --module-muted: rgba(214, 236, 248, 0.97);
  --module-link: rgba(224, 246, 255, 0.99);
  --module-chip-bg: rgba(8, 72, 100, 0.84);
  --module-chip-border: rgba(190, 237, 254, 0.52);
  --module-chip-text: rgba(238, 249, 255, 0.998);
}

/* Light strategy surfaces */
.page-home .home-vector-ribbon,
.page-home .paths,
.page-home .showcase,
.page-home .spotlight,
.page-home .section-ecosystem,
.page-home .section-stats,
.page-home .section-timeline {
  --module-heading: rgba(5, 58, 83, 0.998);
  --module-text: rgba(8, 67, 95, 0.994);
  --module-muted: rgba(29, 82, 109, 0.95);
  --module-link: rgba(8, 88, 122, 0.99);
  --module-chip-bg: rgba(11, 96, 131, 0.12);
  --module-chip-border: rgba(12, 90, 124, 0.34);
  --module-chip-text: rgba(7, 64, 91, 0.994);
}

/*
  Text rhythm guards for long cards and mixed-content lanes.
*/
.page-home :is(.showcase-body, .spotlight-body, .path-subtitle, .constellation-card-detail) {
  line-height: 1.6;
  text-wrap: pretty;
}

.page-home :is(.showcase-bullets, .path-bullets) {
  line-height: 1.58;
  text-wrap: pretty;
}

.page-home :is(.showcase-head p, .paths-head p, .spotlight-head p) {
  max-width: 72ch;
  text-wrap: pretty;
}

.page-home .command-hero h1,
.page-home .showcase-head h2,
.page-home .paths-head h2,
.page-home .home-vector-ribbon-head h2,
.page-home .constellation-copy h2 {
  text-wrap: balance;
}

@media (max-width: 760px) {
  .page-home .content-section :where(p, li, .lead) {
    line-height: 1.62;
  }
}
