/* CasinoOpsAI Internal — site-wide WCAG AA contrast corrections. */
:root {
  --color-gold-text: #7c5515;
  --color-gold-text-hover: #68440f;
  --color-placeholder: #526579;
  --color-on-dark: #ffffff;
  --color-on-dark-muted: #d5dbe1;
  --color-on-dark-soft: #c4ccd4;
  --color-on-dark-gold: #ffe8a8;
  --color-gold-hover: #7c5515;
}

/* Gold is decorative in borders and fills, but text needs a darker gold on light surfaces. */
:where(.section-label,.eyebrow,.section-kicker,.column-kicker,.text-gold,.gold-dot,
  .app-link-open,.summary-arrow,.card-number,.panel-kicker,.boundary-label,.pd-kicker,
  .kicker,.download-label,.logo-word-ai,.coa-demo-logo-main span,dt) {
  color: var(--color-gold-text) !important;
}

/* Preserve a bright gold treatment where the background is genuinely dark. */
:where(.hero,.ai-hero,.page-header,.about-hero,.contact-hero,.sitemap-hero,.article-header,
  .section--dark,.on-dark,.cta-section--dark,.es-review-hero,.es-final-card,.site-footer,
  .coa-demo-topbar,.coa-demo-footer,.app-header)
  :where(.section-label,.eyebrow,.section-kicker,.column-kicker,.gold-dot,.app-link-open,
  .summary-arrow,.card-number,.panel-kicker,.boundary-label,.pd-kicker,.kicker,.download-label) {
  color: var(--color-on-dark-gold) !important;
}

/* White cards nested in dark sections must not inherit white text. */
:where(.section--dark,.on-dark)
  :where(.card,.card--default,.mini-card,.info-card,.service-card,.department-card,.case-card,
  .document-card,.analytics-card,.report-card,.problem-card,.concern-card,.example-card,
  .start-card,.step-card,.package-card,.process-card,.procedure-card,.contact-card,.notice-card,
  .side-card,.side-panel,.focus-panel,.question-panel,.deliverable-panel,.proof-box,.customer-box,
  .example-box,.note-box,.privacy-note,.deliverable,.deliverable-item,.timeline-item,.faq-item)
  :where(h1,h2,h3,h4,h5,h6,strong,.card-title) {
  color: #102033 !important;
}
:where(.section--dark,.on-dark)
  :where(.card,.card--default,.mini-card,.info-card,.service-card,.department-card,.case-card,
  .document-card,.analytics-card,.report-card,.problem-card,.concern-card,.example-card,
  .start-card,.step-card,.package-card,.process-card,.procedure-card,.contact-card,.notice-card,
  .side-card,.side-panel,.focus-panel,.question-panel,.deliverable-panel,.proof-box,.customer-box,
  .example-box,.note-box,.privacy-note,.deliverable,.deliverable-item,.timeline-item,.faq-item)
  :where(p,li,dd,.card-desc,.text-muted) {
  color: #46586f !important;
}
:where(.section--dark,.on-dark)
  :where(.card,.card--default,.mini-card,.info-card,.service-card,.department-card,.case-card,
  .document-card,.analytics-card,.report-card,.problem-card,.concern-card,.example-card,
  .start-card,.step-card,.package-card,.process-card,.procedure-card,.contact-card,.notice-card,
  .side-card,.side-panel,.focus-panel,.question-panel,.deliverable-panel,.proof-box,.customer-box,
  .example-box,.note-box,.privacy-note,.deliverable,.deliverable-item,.timeline-item,.faq-item)
  a:not(.btn):not(.button) {
  color: #123a63 !important;
}
:where(.section--dark,.on-dark)
  :where(.card,.card--default,.mini-card,.info-card,.service-card,.department-card,.case-card,
  .document-card,.analytics-card,.report-card,.problem-card,.concern-card,.example-card,
  .start-card,.step-card,.package-card,.process-card,.procedure-card,.contact-card,.notice-card,
  .side-card,.side-panel,.focus-panel,.question-panel,.deliverable-panel,.proof-box,.customer-box,
  .example-box,.note-box,.privacy-note,.deliverable,.deliverable-item,.timeline-item,.faq-item)
  :where(.section-label,.eyebrow,.section-kicker,.column-kicker,.gold-dot,.summary-arrow,.card-number) {
  color: var(--color-gold-text) !important;
}

/* Header and footer secondary text. */
.logo-byline { color: #385878 !important; }
.language-title { color: #b8c1ca !important; }
.site-footer .footer-nav-title,
.coa-demo-footer h4 { color: #cbd3db !important; }
.site-footer :where(.footer-tagline,.text-muted,.footer-contact p),
.coa-demo-footer p { color: #d0d6dc !important; }
.site-footer .footer-nav a,
.coa-demo-footer a { color: #d9dee3 !important; }
.site-footer :where(.footer-bottom p,.footer-legal a),
.coa-demo-footer-bottom,
.coa-demo-footer-bottom a { color: #bac3cc !important; }
.site-footer .footer-contact .footer-nav-title,
.site-footer .footer-email { color: var(--color-on-dark-gold) !important; }

/* Search and form placeholders are instructions and need normal-text contrast. */
input::placeholder,
textarea::placeholder { color: var(--color-placeholder) !important; opacity: 1 !important; }
.site-search input::placeholder,
.coa-demo-topbar input::placeholder,
:where(.app-header,.section--dark,.on-dark) input::placeholder,
:where(.app-header,.section--dark,.on-dark) textarea::placeholder {
  color: #cbd3db !important;
}

/* Gold call-to-action fills keep dark text, but the darkest stop is raised for AA contrast. */
:where(.btn-gold,.language-link.active,.language-link:hover,.site-search button,
  .mega-cta,.coa-demo-cta,.coa-demo-langs a:first-of-type) {
  color: #07192e !important;
  background: linear-gradient(135deg,#f5da96 0%,#d7ad55 55%,#bd8729 100%) !important;
}

/* Breadcrumbs and hero copy need explicit on-dark colors so list/link rules cannot override them. */
:where(.hero,.ai-hero,.page-header,.about-hero,.contact-hero,.sitemap-hero,.article-header,
  .es-review-hero,.app-header)
  :where(.breadcrumbs,.breadcrumbs li,.breadcrumbs a,.breadcrumbs .sep,.sep,
  .hero-lead,.hero-text,.hero-subtext,.lead) {
  color: #eef2f6 !important;
}
:where(.hero,.ai-hero,.page-header,.about-hero,.contact-hero,.sitemap-hero,.article-header,
  .es-review-hero,.app-header) :where(h1,h2,h3,h4,h5,h6) {
  color: #ffffff !important;
}

/* Common numeric, badge, tab and workflow markers. */
.flow-number { background: #123a63 !important; color: #ffffff !important; }
.tab-button { color: #123a63 !important; background: #ffffff !important; border-color: #9eacba !important; }
.tab-button.active,[aria-selected="true"].tab-button { color: #ffffff !important; background: #123a63 !important; }
:where(.compare-badge,.badge,.pill,.pd-badge) { color: #6c4913 !important; }
:where(.signal-item,.deliverable) { color: #102033 !important; }

/* Tables must retain readable text even when placed inside a dark section. */
table th { color: #ffffff !important; background-color: #123a63 !important; }
table td { color: #34475d; }
:where(.section--dark,.on-dark) table td { color: #34475d !important; background-color: #ffffff !important; }

/* Standalone app/demo footer details and utility labels. */
.coa-demo-logo-small { color: #385878 !important; }
.coa-demo-footer-brand span:first-child { color: var(--color-on-dark-gold) !important; }
.coa-demo-footer .coa-demo-footer-bottom { color: #bac3cc !important; }
.footer-note { color: #46586f !important; }

/* Interactive focus remains visible on both light and dark surfaces. */
:where(a,button,input,textarea,select,summary):focus-visible {
  outline: 3px solid #f3c969 !important;
  outline-offset: 3px !important;
}

/* Internal second-pass corrections found by the complete 728-page computed-style scan. */
.hero {
  background:
    radial-gradient(circle at 16% 0%,rgba(201,155,59,.22),transparent 30rem),
    radial-gradient(circle at 86% 20%,rgba(15,118,110,.16),transparent 28rem),
    linear-gradient(145deg,#07192e 0%,#123a63 58%,#07192e 100%);
  color: #ffffff;
}
.hero :where(h1,h2,h3,h4,h5,h6,.hero-lead,.hero-text,.hero-subtext,.lead) { color:#ffffff !important; }
.hero :where(.eyebrow,.section-label) { color:var(--color-on-dark-gold) !important; }

.article-header .article-meta,
.article-header .article-meta span { color:#d9e0e6 !important; }
:where(.article-header,.page-header,.hero,.about-hero,.contact-hero,.sitemap-hero)
  .breadcrumbs :where(a,li,span,.sep) { color:#eef2f6 !important; }

.search-result span,
.timeline-item > span,
.zh-sop-deliverable > span:first-child,
.bjts-download-card small { color:var(--color-gold-text) !important; }
.pilot-grid span { color:#34475d !important; }
.chips span { color:#102033 !important; background:#eef3f7 !important; }

.workflow-hero .workflow-snapshot dt,
.use-instead-card :where(.section-label,.eyebrow),
.app-header :where(.section-label,.eyebrow) { color:var(--color-on-dark-gold) !important; }

body .section--dark .card.card--default :where(h1,h2,h3,h4,h5,h6,.card-title,strong),
body .on-dark .card.card--default :where(h1,h2,h3,h4,h5,h6,.card-title,strong) {
  color:#102033 !important;
}
body .section--dark .card.card--default :where(p,li,.card-desc),
body .on-dark .card.card--default :where(p,li,.card-desc),
.card:not(.card--accent):not(.dark-card) .card-desc {
  color:#46586f !important;
}
body .section--dark .card.card--default a:not(.btn),
body .on-dark .card.card--default a:not(.btn) { color:#123a63 !important; }

:where(.hero,.ai-hero,.about-hero,.contact-hero,.page-header,.article-header,.cta-section--dark,
  .es-review-hero,.workflow-hero,.workflow-final-cta) .btn-secondary {
  background:#ffffff !important;
  color:#123a63 !important;
  border-color:#ffffff !important;
}

.kpi small { color:#526579 !important; }
.decision small { color:#eef2f6 !important; }
.bjts-promo-note { color:#46586f !important; }
.bjts-promo-kicker,.lab-stage-kicker { color:var(--color-gold-text) !important; }

/* Internal third-pass page-family corrections. */
/* Restore intentionally dark accent cards after the light-card inheritance correction. */
body :where(.card--accent,.dark-card,.output-card--accent,.example-card--accent)
  :where(h1,h2,h3,h4,h5,h6,strong,.card-title) { color:#ffffff !important; }
body :where(.card--accent,.dark-card,.output-card--accent,.example-card--accent)
  :where(p,li,dd,.card-desc,.text-muted) { color:#e2e7eb !important; }
body :where(.card--accent,.dark-card,.output-card--accent,.example-card--accent)
  a:not(.btn):not(.button) { color:#ffe8a8 !important; }

/* Apply the accessible gold consistently despite higher-specificity page styles. */
body :where(.section-label,.eyebrow,.section-kicker,.column-kicker,.panel-kicker,.kicker) {
  color:var(--color-gold-text) !important;
}
body :where(.hero,.ai-hero,.page-header,.about-hero,.sitemap-hero,.article-header,.section--dark,
  .on-dark,.cta-section--dark,.es-review-hero,.es-final-card,.site-footer,.coa-demo-topbar,
  .coa-demo-footer,.app-header,.workflow-hero,.workflow-final-cta,.plan-hero,.cv-hero,
  .download-card,.final-card,.rules-card,.use-instead-card)
  :where(.section-label,.eyebrow,.section-kicker,.column-kicker,.panel-kicker,.kicker) {
  color:var(--color-on-dark-gold) !important;
}

/* The English role-contact hero is intentionally light, unlike the shared contact hero template. */
.contact-page .contact-hero { color:#102033 !important; }
.contact-page .contact-hero :where(h1,h2,h3,h4,h5,h6) { color:#102033 !important; }
.contact-page .contact-hero :where(.hero-lead,.hero-subtext,p) { color:#46586f !important; }
.contact-page .contact-hero :where(.section-label,.eyebrow) { color:var(--color-gold-text) !important; }
.contact-page .contact-hero .btn-secondary { background:#ffffff !important;color:#123a63 !important;border-color:#8294a6 !important; }

/* Dark translucent hero cards need explicit on-dark copy. */
:where(.es-review-card,.cv-summary-card,.plain-card.hero-card,.pilot-panel)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
:where(.es-review-card,.cv-summary-card,.plain-card.hero-card,.pilot-panel)
  :where(p,li,dd) { color:#edf1f4 !important; }
:where(.es-review-card,.cv-summary-card,.pilot-panel)
  :where(span,dt,.pilot-panel__badge) { color:#ffe8a8 !important; }
.plan-hero .pilot-panel :where(dt,.status-grid span) { color:#e0e6eb !important; }

/* SOP department cards are deliberately dark even when placed in a standard section. */
:where(.area-card,.rule-box,.proof-panel)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffe8a8 !important; }
:where(.area-card,.rule-box,.proof-panel)
  :where(p,li,dd) { color:#e4e8ec !important; }
:where(.area-card,.rule-box,.proof-panel) a { color:#ffe8a8 !important; }
.lead-grid > .plain-card,
.timeline-grid > div:has(> span + h3) { color:#ffffff !important; }
.lead-grid > .plain-card :where(h1,h2,h3,h4,h5,h6,strong),
.timeline-grid > div:has(> span + h3) :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffe8a8 !important; }
.lead-grid > .plain-card :where(p,li),
.timeline-grid > div:has(> span + h3) :where(p,li) { color:#e4e8ec !important; }
.lead-grid > .plain-card :where(span),
.timeline-grid > div:has(> span + h3) > span { color:#ffe8a8 !important; }

/* ReportHub local-AI cards use a dark glass treatment. */
:where(.intro-card,.detail-card,.workflow-list,.cta-panel)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#f4d58d !important; }
:where(.intro-card,.detail-card,.workflow-list,.cta-panel)
  :where(p,li,dd,.lead) { color:#e4e1d8 !important; }

/* Small labels on light cards need the darker gold token. */
body :where(.timeline,.timeline-item,.timeline-card,.experience-card,.related-card,.scenario-grid,
  .worked-output-stack,.search-result,.zh-sop-group,.bjts-promo-stats,.blackjack-sop-stats)
  :where(span,dt,.section-label,.eyebrow) { color:var(--color-gold-text) !important; }
body .zh-sop-group summary strong { color:var(--color-gold-text) !important; }

/* Links and headings in light card collections. */
:where(.link-grid a,.area-card.light,.plain-card.light,.proof-card,.showcase-card-link,
  .category-start-card,.employer-box,.questions-panel,.support-list)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
:where(.link-grid a,.area-card.light,.plain-card.light,.proof-card,.showcase-card-link,
  .category-start-card,.employer-box,.questions-panel,.support-list)
  :where(p,li,dd) { color:#46586f !important; }
.link-grid a { color:#123a63 !important; }

/* Legacy hero/final panels with dark backgrounds. */
:where(.es-review-hero,.cv-hero,.workflow-final-cta,.final-card,.download-card,.rules-card,
  .use-instead-card,.lab-stage-hero)
  :where(p,li,dd,.hero-lead,.hero-text,.hero-subtext,.lead) { color:#edf1f4 !important; }
:where(.es-review-hero,.cv-hero,.workflow-final-cta,.final-card,.download-card,.rules-card,
  .use-instead-card,.lab-stage-hero)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }

/* Secondary buttons on dark panels stay clearly visible. */
:where(.plan-hero,.cv-hero,.es-review-hero,.workflow-final-cta,.final-card,.download-card,
  .lab-stage-hero) :where(.btn-secondary,.button--secondary) {
  background:#ffffff !important;color:#123a63 !important;border-color:#ffffff !important;
}

/* Internal fourth-pass corrections: remove broad assumptions and resolve legacy families. */
/* Most timeline grids are light cards; the SOP detail family is the deliberate dark exception. */
.timeline-grid > div :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
.timeline-grid > div :where(p,li,dd) { color:#46586f !important; }
.timeline-grid > div > span { color:var(--color-gold-text) !important; }
body:has(.rules-grid .rule-box) .timeline-grid > div :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffe8a8 !important; }
body:has(.rules-grid .rule-box) .timeline-grid > div :where(p,li,dd) { color:#e4e8ec !important; }
body:has(.rules-grid .rule-box) .timeline-grid > div > span { color:#ffe8a8 !important; }

/* The stop/support rule boxes are translucent light alert surfaces. */
.rule-box.stop { background:#fff4f4 !important; border-color:#d7a6a6 !important; }
.rule-box.support { background:#fff9eb !important; border-color:#d6bc7c !important; }
.rule-box.stop :where(h1,h2,h3,h4,h5,h6,strong) { color:#6f2525 !important; }
.rule-box.support :where(h1,h2,h3,h4,h5,h6,strong) { color:#68440f !important; }
.rule-box :where(p,li,dd) { color:#34475d !important; }

/* Light pilot panels used within department and implementation sections. */
.section.section--alt .pilot-panel :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
.section.section--alt .pilot-panel :where(p,li,dd) { color:#46586f !important; }
.section.section--alt .pilot-panel :where(span,dt,.badge,.badge--gold) { color:#67440f !important; }
.section.section--alt .pilot-panel .badge { background:#fff3d8 !important;border-color:#c39a45 !important; }

/* Dark hero implementation control panels. */
.plan-hero .pilot-panel :where(h1,h2,h3,h4,h5,h6,strong,p,li,dd,dt,.status-grid span) { color:#ffffff !important; }
.plan-hero .pilot-panel__badge { color:#5f3d0b !important;background:#fff3d8 !important;border-color:#e0bd6d !important; }

/* Proof-of-work cards are dark evidence panels. */
.proof-card :where(h1,h2,h3,h4,h5,h6,strong),
.proof-card h3 a { color:#ffffff !important; }
.proof-card :where(p,li,dd) { color:#e2e7eb !important; }
.proof-card > span { color:#ffe8a8 !important; }

/* These compact cards intentionally use dark backgrounds. */
:where(.category-start-card,.employer-box,.questions-panel,.boundary-card,.gm-proof-box,
  .plain-answer-card,.summary-card,.reporthub-mini-panel)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
:where(.category-start-card,.employer-box,.questions-panel,.boundary-card,.gm-proof-box,
  .plain-answer-card,.summary-card,.reporthub-mini-panel)
  :where(p,li,dd) { color:#e4e9ed !important; }
:where(.category-start-card,.employer-box,.questions-panel,.boundary-card,.gm-proof-box,
  .plain-answer-card,.summary-card,.reporthub-mini-panel)
  :where(span,.section-label,.eyebrow) { color:#ffe8a8 !important; }
.reporthub-mini-panel li { color:#ffffff !important; }

/* Role and employer hero families use dark backgrounds. */
:where(.role-hero,.faq-hero,.profile-hero,.employer-hero)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
:where(.role-hero,.faq-hero,.profile-hero,.employer-hero)
  :where(p,li,dd,.hero-lead,.hero-text,.hero-subtext) { color:#edf1f4 !important; }
:where(.role-hero,.faq-hero,.profile-hero,.employer-hero)
  :where(.section-label,.eyebrow,.hero-kicker) { color:#ffe8a8 !important; }

/* CTA panels are normally light; only the tabbed local-AI page uses a dark CTA panel. */
.cta-panel :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
.cta-panel :where(p,li,dd) { color:#46586f !important; }
body:has(#tab-simple) .cta-panel :where(h1,h2,h3,h4,h5,h6,strong) { color:#f4d58d !important; }
body:has(#tab-simple) .cta-panel :where(p,li,dd) { color:#e4e1d8 !important; }
body:has(#tab-simple) .plain-card :where(h1,h2,h3,h4,h5,h6,strong) { color:#f4d58d !important; }
body:has(#tab-simple) .plain-card :where(p,li,dd) { color:#e4e1d8 !important; }
body:has(#tab-simple) .lead { color:#e4e1d8 !important; }
body:has(#tab-simple) .pill { color:#ffe8a8 !important;background:#2a4058 !important; }

/* Dark final CTA and promotional families. */
.final-cta :where(.section-label,.eyebrow) { color:#ffe8a8 !important; }
.bjts-promo-card :where(p,li,dd) { color:#34475d !important; }
.bjts-promo-card :where(.bjts-promo-kicker,.bjts-promo-stats span) { color:#68440f !important; }
.bjts-promo-actions .btn-secondary { background:#123a63 !important;color:#ffffff !important;border-color:#123a63 !important; }
.blackjack-sop-stats span { color:#68440f !important; }

/* Internal: light/glass card surfaces must not carry white-on-pale copy. */
body :where(.dashboard-card,.floating-card,.workflow-snapshot-light,.light-card,.glass-card--light,
  .stat-card,.metric-card,.summary-box,.info-panel-light)
  :where(h1,h2,h3,h4,h5,h6,strong,.card-title,.dashboard-title) {
  color:#102033 !important;
}
body :where(.dashboard-card,.floating-card,.workflow-snapshot-light,.light-card,.glass-card--light,
  .stat-card,.metric-card,.summary-box,.info-panel-light)
  :where(p,li,dd,span,.text-muted,.card-desc) {
  color:#46586f !important;
}
body :where(.dashboard-card,.floating-card,.workflow-snapshot-light,.light-card,.glass-card--light,
  .stat-card,.metric-card,.summary-box,.info-panel-light)
  :where(.section-label,.eyebrow,.kicker,dt) {
  color:#68440f !important;
}

/* Shared light-card labels and dark-section nested white cards. */
:where(.implementation-card,.showcase-card-link,.experience-card,.pilot-card) > span { color:var(--color-gold-text) !important; }
.section--dark .timeline-item :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
.section--dark .timeline-item :where(p,li,dd) { color:#46586f !important; }
.section--dark .timeline-item > span { color:var(--color-gold-text) !important; }

/* Training lab and guided-flow dark surfaces. */
:where(.lab-stage-hero,.bjts-page-hero) :where(h1,h2,h3,h4,h5,h6,strong,p,li,dd) { color:#ffffff !important; }
:where(.lab-stage-hero,.bjts-page-hero) :where(span,.lab-stage-kicker,.bjts-label) { color:#ffe8a8 !important; }
.hero-flow-card .flow-label { color:#eef2f6 !important; }

/* Standalone app headers and decision cards. */
.app-header :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
.app-header :where(p,li,dd,.eyebrow) { color:#eef2f6 !important; }
.coa-demo-logo-mark { color:#ffe8a8 !important; }
.decision small { color:#ffffff !important; }

/* Internal fifth-pass: shared class names with opposite light/dark implementations. */
/* Boundary cards are light by default across multilingual SOP pages. */
.boundary-card :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
.boundary-card :where(p,li,dd) { color:#34475d !important; }
.boundary-card :where(.boundary-label,span) { color:var(--color-gold-text) !important; }
/* English department-plan boundary cards are dark operational panels. */
body:has(.employer-box) .boundary-card :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
body:has(.employer-box) .boundary-card :where(p,li,dd) { color:#e4e9ed !important; }
body:has(.employer-box) .boundary-card :where(.boundary-label,span) { color:#ffe8a8 !important; }

/* Proof cards are light throughout the current site. */
.proof-card :where(h1,h2,h3,h4,h5,h6,strong),
.proof-card h3 a,
.proof-card a { color:#102033 !important; }
.proof-card :where(p,li,dd) { color:#34475d !important; }
.proof-card > span { color:var(--color-gold-text) !important; }

/* White content cards inside dark hero shells. */
:where(.about-hero .profile-card,.questions-panel) :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
:where(.about-hero .profile-card,.questions-panel) :where(p,li,dd) { color:#46586f !important; }
:where(.about-hero .profile-card,.questions-panel) :where(span,.section-label,.eyebrow) { color:var(--color-gold-text) !important; }

/* Lists that sit directly on dark support/rules panels. */
:where(.support-list,.rules-list) :where(li,p,dd) { color:#eef2f6 !important; }

/* Blackjack promotion cards use a dark blue gradient. */
.bjts-promo-card :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
.bjts-promo-card :where(p,li,dd,.bjts-promo-note) { color:#eef2f6 !important; }
.bjts-promo-card :where(.bjts-promo-kicker,.bjts-promo-stats span) { color:#ffe8a8 !important; }
.blackjack-sop-card .blackjack-sop-stats span { color:#ffe8a8 !important; }

/* Training lab labels need normal-text contrast on medium blue glass. */
.lab-stage-hero :where(.lab-stage-kicker,.lab-stage-stats span) { color:#ffffff !important; }
.bjts-page-hero .bjts-hero-stats span { color:#ffffff !important; }

/* Dark comparison cards nested in a section that also contains white cards. */
.section--dark .comparison-card :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
.section--dark .comparison-card :where(p,li,dd) { color:#46586f !important; }

/* Preserve genuinely dark utility cards. */
.card--dark { background:#123a63 !important;color:#ffffff !important; }
.card--dark :where(h1,h2,h3,h4,h5,h6,strong,p,li,dd) { color:#ffffff !important; }

/* Final small-label clean-up. */
.exp-section .section-label,
.local-panel .section-label,
.lab-overview-head > span,
.implementation-card > span { color:var(--color-gold-text) !important; }
.ai-hero .hero-problem-tail { color:#eef2f6 !important; }

/* Internal sixth-pass: final legacy surfaces and exact AA margins. */
/* SOP accent introductory card is a light gold panel. */
body:has(.rules-grid .rule-box) .lead-grid .plain-card.accent {
  background:#fff8e8 !important;border-color:#d6bc7c !important;
}
body:has(.rules-grid .rule-box) .lead-grid .plain-card.accent :where(h1,h2,h3,h4,h5,h6,strong) { color:#68440f !important; }
body:has(.rules-grid .rule-box) .lead-grid .plain-card.accent :where(p,li,dd) { color:#34475d !important; }

/* Questions panels are white cards; their surrounding sections may be dark. */
body .questions-panel :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
body .questions-panel :where(p,li,dd) { color:#34475d !important; }
body .questions-panel :where(span,.section-label,.eyebrow) { color:var(--color-gold-text) !important; }

/* Boundary cards inside explicit dark-section layouts are dark glass panels. */
.dark-section .boundary-card :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
.dark-section .boundary-card :where(p,li,dd) { color:#eef2f6 !important; }
.dark-section .boundary-card :where(.boundary-label,span) { color:#ffffff !important; }
.dark-section .boundary-layout > div > p { color:#eef2f6 !important; }

/* Medium-blue promotional panels need pure white for small text. */
.bjts-promo-card :where(p,li,dd,.bjts-promo-note,.bjts-promo-kicker,.bjts-promo-stats span) { color:#ffffff !important; }
.blackjack-sop-card :where(p,li,dd,.blackjack-sop-stats span) { color:#ffffff !important; }

/* Dark labels in training sections versus light labels in ordinary sections. */
.bjts-section .bjts-label,
.lab-heading > span,
.tool-intro > div > span { color:var(--color-gold-text) !important; }
.bjts-section-dark :where(.bjts-label,p,li,dd) { color:#ffffff !important; }
.bjts-lab-panel .bjts-label,
.bjts-package .bjts-label { color:var(--color-gold-text) !important; }

/* Additional dark hero families. */
:where(.hybrid-hero,.examples-hero,.dept-hero,.pd-hero,.brief-hero,.proof-hero,.rolefit-hero,
  .apps-index-hero,.es-apps-hero)
  :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
:where(.hybrid-hero,.examples-hero,.dept-hero,.pd-hero,.brief-hero,.proof-hero,.rolefit-hero,
  .apps-index-hero,.es-apps-hero)
  :where(p,li,dd,.lead,.hero-lead,.hero-text,.hero-subtext) { color:#ffffff !important; }
:where(.hybrid-hero,.examples-hero,.dept-hero,.pd-hero,.brief-hero,.proof-hero,.rolefit-hero,
  .apps-index-hero,.es-apps-hero)
  :where(.section-label,.eyebrow,.hero-kicker) { color:#ffffff !important; }

/* Some hero side cards are light even inside a dark hero. */
body .about-hero .profile-card :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
body .about-hero .profile-card :where(p,li,dd) { color:#34475d !important; }

/* Dark call-to-action blocks. */
:where(.final-cta,.apps-cta-card) :where(h1,h2,h3,h4,h5,h6,strong) { color:#ffffff !important; }
:where(.final-cta,.apps-cta-card) :where(p,li,dd) { color:#ffffff !important; }
:where(.final-cta,.apps-cta-card) :where(.section-label,.eyebrow) { color:#ffffff !important; }

/* Dark primary cards and promotional cards. */
.apps-index-card--primary :where(h1,h2,h3,h4,h5,h6,strong,p,li,dd) { color:#ffffff !important; }
.implementation-card--primary > span { color:#ffffff !important; }
.blackjack-sop-card :where(h1,h2,h3,h4,h5,h6,strong,p,li,dd) { color:#ffffff !important; }

/* Small text in standalone shift optimizer missed AA by a narrow margin. */
.main .head p,
.main .draft-status { color:#526579 !important; }

/* Strengthen brand and app header exceptions. */
body .coa-demo-logo-mark { color:#ffffff !important; }
body header.app-header { background:#123a63 !important;color:#ffffff !important; }
body header.app-header :where(h1,h2,h3,h4,h5,h6,strong,p,.eyebrow,.subhead) { color:#ffffff !important; }

/* Section labels on dark niche sections. */
.exp-section .section-label,
.local-section .section-label { color:#ffffff !important; }

/* Internal seventh-pass: exact residual contrast corrections from all-page audit. */
/* Standalone demo identity marks need a stable dark backing behind the glyph. */
.coa-demo-logo-mark {
  background:#07192e !important;
  color:#ffffff !important;
  border-color:#c9a24a !important;
}
.decision .decision-label { color:#ffffff !important; }

/* This about-page CTA is intentionally pale, unlike the dark final CTA family. */
body:has(.about-hero) .final-cta :where(h1,h2,h3,h4,h5,h6,strong) { color:#102033 !important; }
body:has(.about-hero) .final-cta :where(p,li,dd) { color:#34475d !important; }
body:has(.about-hero) .final-cta :where(.section-label,.eyebrow) { color:#68440f !important; }

/* The question copy card is light, but its question list is a dark inset panel. */
body:has(.questions-section) .questions-panel ul :where(li,p,dd) { color:#ffffff !important; }

/* Exact dark hero safeguards for legacy page-local selectors. */
.dept-hero .eyebrow,
.pd-hero .section-label,
.proof-hero .hero-kicker { color:#ffffff !important; }
.plan-hero :where(.hero-lead,.hero-text) { color:#ffffff !important; }
.plan-hero .plain-card p { color:#ffffff !important; }
.trust-section .quote-box p { color:#102033 !important; }

/* Number medallions in the player-development pilot cards use a dark fill. */
.pilot-card > span { color:#ffffff !important; }

/* The Blackjack training promotion is darkened so all small white copy clears AA. */
.bjts-promo-card {
  background:linear-gradient(145deg,#061423 0%,#0b2f52 58%,#08213b 100%) !important;
}
.bjts-promo-card :where(p,li,dd,.bjts-promo-note,.bjts-promo-kicker,.bjts-promo-stats span) {
  color:#ffffff !important;
}

/* Light-gold responsible-gambling panel needs a darker gold heading. */
.lead-grid .rule-card > strong { color:#68440f !important; }

/* Spanish apps CTA is a dark glass panel. */
.apps-cta-card .section-label { color:#ffffff !important; }

/* Dutch dark-section secondary CTA uses a solid light treatment. */
.section--dark .cta-row .button--secondary {
  background:#ffffff !important;
  color:#102033 !important;
  border-color:#ffffff !important;
}

/* Internal eighth-pass: scope pilot labels by surface instead of by shared class name. */
.implementation-section .pilot-card > span.section-label { color:#68440f !important; }
body:has(.pd-hero) .pilot-card > span { color:#ffffff !important; }
body:has(.custom-app-hero) .pilot-card > span,
body:has(.app-creation-hero) .pilot-card > span,
body:has(.builder-hero) .pilot-card > span { color:#68440f !important; }
/* Fallback for the Custom App Creation numbered cards. */
body:has(a[href*="/apps/"]) .pilot-grid .pilot-card > span:not(.section-label) { color:#68440f !important; }

/* Employer quote is a dark evidence panel. */
.trust-section .quote-box p { color:#ffffff !important; }
/* Internal ninth-pass: player-development number medallions are teal. */
body:has(.pd-hero) .alt-section .pilot-grid .pilot-card > span:not(.section-label) { color:#ffffff !important; }


/* CasinoOpsAI Internal — computed-style contrast hardening. */
:where(.article-header,.page-header,.hero,.ai-hero,.about-hero,.contact-hero,.sitemap-hero)
  .breadcrumbs .sep {
  color:#ffffff !important;
  opacity:1 !important;
}

/* Screenshot labels must remain readable even before the underlying image has loaded. */
:where(.showcase-shot-overlay,.gm-shot-overlay) {
  background:linear-gradient(180deg,rgba(7,25,46,.78) 0%,#07192e 100%) !important;
}
:where(.showcase-shot-overlay,.gm-shot-overlay) strong {
  color:#ffffff !important;
}


/* Localized desktop navigation stays inside the content container after the global stylesheet repair. */
@media (min-width:981px) and (max-width:1500px) {
  :is(html[lang="es"],html[lang="fr"],html[lang="ru"]) .header-inner { gap:.5rem; }
  :is(html[lang="es"],html[lang="fr"],html[lang="ru"]) .site-logo { gap:.45rem; }
  :is(html[lang="es"],html[lang="fr"],html[lang="ru"]) .logo-byline { display:none; }
  :is(html[lang="es"],html[lang="fr"],html[lang="ru"]) .logo-symbol { width:2.4rem; height:2.4rem; border-radius:.82rem; }
  :is(html[lang="es"],html[lang="fr"],html[lang="ru"]) :is(.logo-word-main,.logo-word-ai) { font-size:1.1rem; }
  :is(html[lang="es"],html[lang="fr"],html[lang="ru"]) .nav-list { gap:0; }
  :is(html[lang="es"],html[lang="fr"],html[lang="ru"]) .nav-link { font-size:.8rem; padding:.54rem .36rem; gap:.2rem; }
}

/* Internal: Turkish Beverage fallback uses a list inside the dark workflow snapshot. */
.workflow-hero .workflow-snapshot ul,
.workflow-hero .workflow-snapshot li{color:#fff!important}

/* Internal: product overview labels sit on light content sections, not on the dark hero. */
body .nlapp-page :is(.nlapp-values,.nlapp-tour,.nlapp-workflow,.nlapp-boundaries,.nlapp-roles,.nlapp-demo) .nlapp-eyebrow {
  color:#8a620f !important;
}
