/* Final reliability, contrast and theme layer for Mlolongo Actors */
:root {
  color-scheme: light;
  --read-text: #142033;
  --read-muted: #39485d;
  --read-heading: #101a2b;
  --read-accent: #762638;
  --read-accent-hover: #5e1c2b;
  --read-gold: #745018;
  --read-surface: #ffffff;
  --read-surface-alt: #f4f6f9;
  --read-border: #c8d0dc;
  --read-header: #09182a;
}
html { scroll-behavior: smooth; }
body { color: var(--read-text) !important; background: #fff !important; }
body, p, li, dd, dt, label, small, figcaption, .description, .card-text {
  color: var(--read-text);
}
h1,h2,h3,h4,h5,h6 { color: var(--read-heading); }
.section-label,.eyebrow,.section-heading .eyebrow,.leader-position {
  color: var(--read-accent) !important;
  font-weight: 800 !important;
}
a:not(.btn):not(.brand) { color: #702235; }
a:not(.btn):not(.brand):hover { color: #4d1425; }
.btn-primary { background: #842b3c !important; color: #fff !important; }
.btn-primary:hover { background: #641d2c !important; }
.btn-outline { color: #fff !important; border-color: #fff !important; }
.header { background: #09182a !important; }
.brand-text strong { color: #fff !important; }
.brand-text span { color: #f0d49b !important; }
#mainNav a { color: #fff !important; }
.hero,.page-hero,.statement,.leadership-cta { color: #fff !important; }
.hero h1,.hero h2,.hero h3,.hero p,.hero li,.hero .hero-location,
.page-hero h1,.page-hero h2,.page-hero p,
.statement h1,.statement h2,.statement h3,.statement p,
.leadership-cta h1,.leadership-cta h2,.leadership-cta p { color: #fff !important; }
.hero .eyebrow,.page-hero .eyebrow,.hero .section-label { color: #f2d79f !important; }
.introduction,.gallery-intro,.contact-intro,.leadership-intro { color: var(--read-text); }
.statement-card,.principle,.leader-card,.founder-feature,.gallery-item,
.production-card,.activity-card,.membership-card,.contact-card {
  color: var(--read-text);
  background: var(--read-surface) !important;
  border-color: var(--read-border) !important;
}
.statement-card p,.principle p,.leader-card p,.founder-feature p,
.gallery-item p,.production-card p,.activity-card p,.membership-card p,.contact-card p {
  color: var(--read-muted) !important;
}
.footer { color: #f4f6fa !important; background: #06111f !important; }
.footer p,.footer li,.footer small,.footer h2,.footer h3,.footer a { color: #f4f6fa !important; }
.footer a:hover { color: #f2d79f !important; }
input,select,textarea { color: #142033 !important; background: #fff !important; border-color: #9aa7b8 !important; }
input::placeholder,textarea::placeholder { color: #596579 !important; opacity: 1; }
.menu-toggle { display: none; color: #fff !important; background: #142b45 !important; border: 1px solid #f0d49b !important; min-width: 46px; min-height: 44px; cursor: pointer; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid #e4c98f; background: #142b45; color: #fff;
  font: 700 .88rem 'Source Sans 3',Arial,sans-serif; cursor: pointer;
  white-space: nowrap;
}
.theme-toggle:hover { background: #203e60; }
/* Do not hide page content waiting for an animation observer. */
.reveal-ready .scroll-reveal,
.reveal-ready .scroll-reveal.is-revealed {
  opacity: 1 !important; visibility: visible !important; transform: none !important;
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
  .navbar { position: relative; }
  #mainNav { display: none !important; width: 100%; flex-direction: column; align-items: stretch; }
  #mainNav.open { display: flex !important; }
  #mainNav a { display: block; width: 100%; padding: 13px 10px !important; border-top: 1px solid rgba(255,255,255,.16); }
  .theme-toggle { margin-left: auto; }
}
@media (max-width: 480px) {
  .brand img { width: 43px; height: 43px; }
  .brand-text strong { font-size: .82rem; }
  .brand-text span { font-size: .61rem; }
  .theme-toggle { min-height: 40px; padding: 7px 10px; font-size: .78rem; }
}
/* Dark mode uses explicit high-contrast text and surfaces. */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: #0b1422 !important; color: #f1f5fb !important; }
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,
html[data-theme="dark"] h4,html[data-theme="dark"] h5,html[data-theme="dark"] h6,
html[data-theme="dark"] p,html[data-theme="dark"] li,html[data-theme="dark"] label,
html[data-theme="dark"] small,html[data-theme="dark"] figcaption,
html[data-theme="dark"] dd,html[data-theme="dark"] dt { color: #edf2fa !important; }
html[data-theme="dark"] .introduction,html[data-theme="dark"] .gallery-intro,
html[data-theme="dark"] .contact-intro,html[data-theme="dark"] .leadership-intro,
html[data-theme="dark"] .section,html[data-theme="dark"] main > section:not(.hero):not(.page-hero):not(.statement):not(.leadership-cta) {
  background: #101d2e !important; color: #edf2fa !important;
}
html[data-theme="dark"] .statement-card,html[data-theme="dark"] .principle,
html[data-theme="dark"] .leader-card,html[data-theme="dark"] .founder-feature,
html[data-theme="dark"] .gallery-item,html[data-theme="dark"] .production-card,
html[data-theme="dark"] .activity-card,html[data-theme="dark"] .membership-card,
html[data-theme="dark"] .contact-card {
  background: #17263a !important; color: #f1f5fb !important; border-color: #35465d !important;
}
html[data-theme="dark"] .statement-card p,html[data-theme="dark"] .principle p,
html[data-theme="dark"] .leader-card p,html[data-theme="dark"] .founder-feature p,
html[data-theme="dark"] .gallery-item p,html[data-theme="dark"] .production-card p,
html[data-theme="dark"] .activity-card p,html[data-theme="dark"] .membership-card p,
html[data-theme="dark"] .contact-card p { color: #d2dceb !important; }
html[data-theme="dark"] .section-label,html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .leader-position { color: #f0cf87 !important; }
html[data-theme="dark"] a:not(.btn):not(.brand) { color: #f0cf87; }
html[data-theme="dark"] a:not(.btn):not(.brand):hover { color: #ffe5ad; }
html[data-theme="dark"] .header,html[data-theme="dark"] .footer { background: #050c16 !important; }
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea {
  background: #f8fafc !important; color: #111827 !important; border-color: #9aa7b8 !important;
}
html[data-theme="dark"] .theme-toggle { background: #f0cf87; color: #142033; border-color: #f0cf87; }
html[data-theme="dark"] .theme-toggle:hover { background: #ffe5ad; }


/* Accessible statement cards: avoid white-on-white mission and vision text. */
.statement .statement-card {
  background: #ffffff !important;
  color: #142033 !important;
  border-left-color: #8a6427 !important;
}
.statement .statement-card > span {
  display: inline-block;
  color: #684713 !important;
  font-weight: 800;
}
.statement .statement-card h1,
.statement .statement-card h2,
.statement .statement-card h3,
.statement .statement-card p {
  color: #142033 !important;
}
.statement .statement-card h3 {
  line-height: 1.65;
}

/* Keep all text readable on light surfaces throughout light mode. */
html:not([data-theme="dark"]) .statement-card,
html:not([data-theme="dark"]) .statement-card * {
  color: #142033;
}
html:not([data-theme="dark"]) .statement-card > span {
  color: #684713 !important;
}

/* Compact, icon-only theme switch. */
.theme-toggle {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0 !important;
  border-radius: 50%;
  gap: 0;
  font-size: 1.25rem !important;
  line-height: 1;
}
html[data-theme="dark"] .statement .statement-card {
  background: #17263a !important;
  color: #f1f5fb !important;
  border-left-color: #f0cf87 !important;
}
html[data-theme="dark"] .statement .statement-card > span {
  color: #f0cf87 !important;
}
html[data-theme="dark"] .statement .statement-card h1,
html[data-theme="dark"] .statement .statement-card h2,
html[data-theme="dark"] .statement .statement-card h3,
html[data-theme="dark"] .statement .statement-card p {
  color: #f1f5fb !important;
}

/* Mobile header: brand on the left, controls on the right, menu at far right. */
@media (max-width: 900px) {
  .navbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 9px;
  }
  .navbar > .brand {
    order: 1;
    margin-right: auto !important;
    flex: 0 1 auto;
  }
  .navbar > .theme-toggle {
    order: 2;
    margin-left: 0 !important;
    flex: 0 0 42px;
  }
  .navbar > .menu-toggle {
    order: 3;
    margin-left: 0 !important;
    flex: 0 0 46px;
    position: relative;
    z-index: 5;
  }
  .navbar > #mainNav {
    order: 4;
    flex: 0 0 100%;
    width: 100%;
  }
}
