[data-smart-contrast="1"] {
  color: var(--smart-text, var(--text));
}

[data-smart-palette-lock="1"] {
  --smart-heading: var(--module-heading, var(--text-strong));
  --smart-text: var(--module-text, var(--text));
  --smart-muted: var(--module-muted, var(--text-muted));
  --smart-link: var(--module-link, var(--color-accent-2));
  --smart-chip-bg: var(--module-chip-bg, rgba(16, 102, 138, 0.12));
  --smart-chip-border: var(--module-chip-border, rgba(12, 90, 124, 0.3));
  --smart-chip-text: var(--module-chip-text, var(--module-heading, var(--text-strong)));
}

[data-smart-palette-lock="1"] :where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .hero-story-title,
  .showcase-title,
  .spotlight-title,
  .path-title,
  .constellation-card-title
) {
  color: var(--module-heading, var(--smart-heading, var(--text-strong))) !important;
}

[data-smart-palette-lock="1"] :where(
  p,
  li,
  .lead,
  .showcase-body,
  .spotlight-body,
  .path-subtitle,
  .constellation-card-detail,
  .mega-link-desc
) {
  color: var(--module-text, var(--smart-text, var(--text))) !important;
}

[data-smart-palette-lock="1"] :where(
  .badge,
  .path-tag,
  .showcase-kicker,
  .spotlight-kicker,
  .hero-story-slide-rubric > span
) {
  color: var(--module-chip-text, var(--smart-chip-text, var(--module-heading, var(--text-strong)))) !important;
  border-color: var(--module-chip-border, var(--smart-chip-border, rgba(12, 90, 124, 0.3))) !important;
  background: var(--module-chip-bg, var(--smart-chip-bg, rgba(16, 102, 138, 0.12))) !important;
}

[data-smart-contrast="1"] :where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .hero-story-title,
  .showcase-title,
  .spotlight-title,
  .path-title,
  .case-study-title,
  .hero-story-axiom h3,
  .hero-story-panel h3,
  .hero-story-phase-copy strong,
  .constellation-card-title,
  .mega-feature-title,
  .mega-link-title,
  .stat-value
) {
  color: var(--smart-heading, var(--text-strong)) !important;
}

[data-smart-contrast="1"] :where(
  p,
  li,
  .lead,
  .showcase-body,
  .spotlight-body,
  .path-subtitle,
  .case-study-summary,
  .timeline-body,
  .timeline-title,
  .matrix-cell,
  .matrix-col,
  .matrix-row-title,
  .logo-pill-label,
  .stat-label,
  .mega-feature-body,
  .hero-story-telemetry-card p,
  .hero-story-axiom p,
  .hero-story-signal p,
  .hero-story-panel > p,
  .hero-story-panel-seal,
  .hero-story-phase-copy span,
  .hero-story-signal-value,
  .hero-story-proofline span,
  .hero-story-intent p,
  .hero-story-cluster-body,
  .hero-story-chips li,
  .showcase-bullets,
  .path-bullets,
  .showcase-head p,
  .spotlight-head p,
  .paths-head p,
  .constellation-copy p,
  .constellation-card-detail,
  .mega-link-desc
) {
  color: var(--smart-text, var(--text)) !important;
}

[data-smart-contrast="1"] :where(
  .showcase-body,
  .spotlight-body,
  .path-subtitle,
  .path-bullets,
  .path-bullets li,
  .showcase-bullets,
  .showcase-bullets li
) {
  font-weight: 565;
}

[data-smart-contrast="1"] li::marker {
  color: var(--smart-link, var(--color-accent-2));
}

[data-smart-contrast="1"] :where(.text-muted, .stat-detail, .hero-story-telemetry-label, .hero-story-signal-label, .hero-story-panel-kicker, .hero-story-intent-label, .hero-story-proofline strong, .constellation-card-category) {
  color: var(--smart-muted, var(--text-muted)) !important;
}

[data-smart-contrast="1"] a {
  color: var(--smart-link, var(--color-accent-2)) !important;
}

[data-smart-contrast="1"] :where(.badge, .path-tag, .showcase-kicker, .spotlight-kicker, .case-study-sector, .mega-title, .hero-story-panel-code, .hero-story-axiom-code, .hero-story-cluster-title, .hero-story-slide-rubric > span) {
  color: var(--smart-chip-text, var(--smart-heading, var(--text-strong))) !important;
  border-color: var(--smart-chip-border, rgba(12, 90, 124, 0.3));
  background: var(--smart-chip-bg, rgba(16, 102, 138, 0.12));
}

[data-smart-contrast="1"][data-tone="paper"][data-smart-heading-gradient="1"]:not([data-contrast-bias="high"]):not([data-smart-palette-lock="1"]) :where(h1) {
  background-image: var(--smart-heading-gradient, none);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}

[data-smart-contrast="1"][data-tone="ink"] :where(.hero-story-title) {
  text-shadow: 0 1px 0 rgba(2, 11, 20, 0.28), 0 8px 16px rgba(2, 11, 20, 0.24);
}

[data-smart-contrast="1"][data-tone="ink"] :where(
  .hero-story-telemetry-card,
  .hero-story-proofline,
  .hero-story-axiom,
  .hero-story-signal,
  .hero-story-panel-seal,
  .hero-story-cluster,
  .paths-head,
  .spotlight-head,
  .constellation-copy,
  .mega-col,
  .mega-feature-card--dark
) {
  color: var(--smart-text, var(--text-on-ink));
}

[data-smart-contrast="1"] .cta-secondary {
  border-color: var(--smart-chip-border, rgba(12, 90, 124, 0.3));
  color: var(--smart-chip-text, var(--smart-heading, var(--text-strong))) !important;
}

[data-smart-contrast="1"] .cta-primary {
  color: rgba(248, 254, 255, 0.99) !important;
}

[data-smart-contrast="1"][data-tone="paper"] {
  --smart-heading: rgba(5, 58, 84, 0.997);
  --smart-text: rgba(7, 64, 91, 0.992);
  --smart-muted: rgba(30, 82, 109, 0.95);
  --smart-link: rgba(7, 89, 124, 0.99);
  --smart-chip-bg: rgba(16, 102, 138, 0.12);
  --smart-chip-border: rgba(12, 90, 124, 0.3);
  --smart-chip-text: rgba(7, 64, 91, 0.99);
}

[data-smart-contrast="1"][data-tone="ink"] {
  --smart-heading: rgba(245, 252, 255, 0.99);
  --smart-text: rgba(230, 246, 253, 0.98);
  --smart-muted: rgba(205, 232, 245, 0.94);
  --smart-link: rgba(214, 241, 255, 0.98);
  --smart-chip-bg: rgba(11, 76, 106, 0.72);
  --smart-chip-border: rgba(171, 226, 248, 0.38);
  --smart-chip-text: rgba(227, 247, 255, 0.98);
}

[data-smart-contrast="1"][data-tone="ink"] .cta-secondary {
  background: rgba(9, 58, 82, 0.72);
}

[data-smart-contrast="1"][data-tone="paper"] .cta-secondary {
  background: rgba(245, 252, 255, 0.76);
}

[data-smart-contrast="1"][data-tone="ink"][data-contrast-bias="high"] {
  --smart-text: rgba(236, 248, 254, 0.99);
  --smart-muted: rgba(214, 237, 248, 0.96);
  text-shadow: 0 1px 0 rgba(2, 11, 20, 0.28);
}

[data-smart-contrast="1"][data-tone="paper"][data-contrast-bias="high"] {
  --smart-heading: rgba(5, 58, 83, 0.995);
  --smart-text: rgba(8, 67, 95, 0.99);
  --smart-muted: rgba(31, 84, 111, 0.95);
  --smart-link: rgba(6, 87, 121, 0.99);
  --smart-chip-bg: rgba(10, 96, 131, 0.16);
  --smart-chip-border: rgba(11, 86, 120, 0.36);
  --smart-chip-text: rgba(7, 63, 90, 0.99);
  text-shadow: none;
}

[data-smart-contrast="1"][data-contrast-bias="high"] :where(h1, h2, h3, .hero-story-title, .showcase-title, .spotlight-title, .path-title, .constellation-card-title) {
  color: var(--smart-heading, var(--text-strong)) !important;
  background-image: none !important;
}

[data-smart-contrast="1"][data-contrast-bias="high"] :where(
  p,
  li,
  .lead,
  .showcase-body,
  .spotlight-body,
  .path-subtitle,
  .path-bullets,
  .showcase-bullets,
  .timeline-body,
  .timeline-title,
  .matrix-cell,
  .matrix-col,
  .matrix-row-title,
  .logo-pill-label,
  .stat-label,
  .hero-story-panel-point,
  .hero-story-panel-point span,
  .hero-story-cluster-tags span,
  .hero-story-phase-copy span,
  .hero-story-intent p,
  .constellation-card-detail,
  .mega-link-desc
) {
  color: var(--smart-text, var(--text)) !important;
  text-shadow: none !important;
}

[data-smart-contrast="1"][data-tone="paper"][data-contrast-bias="high"] :where(.cta-secondary) {
  border-color: rgba(12, 90, 124, 0.42);
  background: rgba(244, 251, 255, 0.9);
}

[data-smart-contrast="1"][data-tone="ink"][data-contrast-bias="high"] :where(.cta-secondary) {
  border-color: rgba(192, 238, 254, 0.48);
  background: rgba(8, 62, 88, 0.86);
}

[data-smart-contrast="1"][data-tone="ink"][data-contrast-bias="critical"] {
  --smart-heading: rgba(247, 253, 255, 0.998);
  --smart-text: rgba(239, 249, 255, 0.995);
  --smart-muted: rgba(220, 240, 249, 0.98);
  --smart-link: rgba(223, 245, 255, 0.99);
  --smart-chip-bg: rgba(8, 68, 95, 0.86);
  --smart-chip-border: rgba(195, 238, 254, 0.54);
  --smart-chip-text: rgba(238, 249, 255, 0.99);
  text-shadow: none !important;
}

[data-smart-contrast="1"][data-tone="paper"][data-contrast-bias="critical"] {
  --smart-heading: rgba(4, 54, 78, 0.999);
  --smart-text: rgba(7, 61, 88, 0.998);
  --smart-muted: rgba(27, 77, 102, 0.97);
  --smart-link: rgba(6, 88, 122, 0.99);
  --smart-chip-bg: rgba(12, 93, 126, 0.2);
  --smart-chip-border: rgba(8, 79, 110, 0.42);
  --smart-chip-text: rgba(6, 61, 86, 0.99);
  text-shadow: none !important;
}

[data-smart-contrast="1"][data-contrast-bias="critical"] :where(
  h1,
  h2,
  h3,
  .stat-value,
  p,
  li,
  .lead,
  .showcase-body,
  .spotlight-body,
  .path-subtitle,
  .path-bullets,
  .showcase-bullets,
  .timeline-body,
  .timeline-title,
  .matrix-cell,
  .matrix-col,
  .matrix-row-title,
  .logo-pill-label,
  .stat-label,
  .constellation-card-detail
) {
  color: var(--smart-text, var(--text-on-ink)) !important;
  background-image: none !important;
}

[data-smart-contrast="1"][data-tone="ink"] :where(
  .showcase-bullets,
  .showcase-bullets li,
  .path-bullets,
  .path-bullets li,
  .spotlight-body,
  .constellation-card-detail,
  .hero-story-panel p,
  .mega-link-desc,
  .mega-feature-body
) {
  color: var(--smart-text, var(--text-on-ink));
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  [data-smart-contrast="1"][data-tone="paper"][data-smart-heading-gradient="1"] :where(h1, h2) {
    color: var(--smart-heading, var(--text-strong));
  }
}
