
/* Sea Of Glass And Mirrors — Typography Contrast Governance 0.5.23
   GOLDEN RULE: text inside dark themed panels must never inherit black/dark
   foreground colors that reduce legibility. */

:root{
  --sog-readable-text:var(--sog-theme-text,#f3f7fb);
  --sog-readable-muted:var(--sog-theme-muted,#c7d7e5);
}

/* General readable foreground inside public dark surfaces. */
body[data-sog-design] :is(
  .content-text,.content-card,.series-item,.feature-card,.service-card,
  .testimonial-card,.contact-card,.contact-info,.contact-map-card,
  .contact-location-card,.about-content,.article-card,.official-article-card,
  .blog-card,.gallery-item,.panel,.inner-panel
) {
  color:var(--sog-readable-text)!important;
}

/* Lists and their inline descendants must inherit the panel foreground. */
body[data-sog-design] :is(
  .content-text,.content-card,.series-item,.feature-card,.service-card,
  .about-content,.article-card,.official-article-card,.panel,.inner-panel
) :is(ul,ol,li,li span,li strong,li em) {
  color:inherit!important;
}

/* Links inside dark panels keep themed accent, never default browser blue/black. */
body[data-sog-design] :is(
  .content-text,.content-card,.series-item,.feature-card,.service-card,
  .about-content,.article-card,.official-article-card,.panel,.inner-panel
) a {
  color:var(--sog-accent,#55d9ff)!important;
}

/* Explicit fix for Mirrors service list and analogous descriptive lists. */
body[data-sog-design] .mirrors-content :is(ul,ol,li),
body[data-sog-design] .mirror-content :is(ul,ol,li),
body[data-sog-design] [data-page="mirrors"] :is(ul,ol,li) {
  color:var(--sog-readable-text)!important;
}

/* Preserve contrast if a Page Design changes the panel background. */
body[data-sog-design] :is(
  .content-text,.content-card,.series-item,.feature-card,.service-card,
  .about-content,.article-card,.official-article-card,.panel,.inner-panel
) :is(p,li,small,label) {
  text-shadow:none!important;
}

/* SOG-123 — reusable editorial surfaces.  This is deliberately universal,
   not Shower-Doors-specific. Explicit Editor inline !important colors still
   win, while automatic/legacy content follows the active Professional Palette. */
body[data-sog-design] .sog-editorial-panel:not([style*="color:"]) {
  color:var(--sog-theme-surface-text,var(--sog-readable-text,#f3f7fb))!important;
}
body[data-sog-design] .sog-editorial-list li:not([style*="color:"]) {
  color:var(--sog-theme-surface-text,var(--sog-readable-text,#f3f7fb))!important;
  -webkit-text-fill-color:currentColor!important;
}
