/* R5.8.5-F — contrast and legibility: cards, metrics and navigation.
   Source: R5.8.5 G3 + screenshot review. Accessible light/dark contrast. */
html[data-bs-theme="light"] .r585-doc-page .r585-metrics > div {
  background:#fff!important;border:1px solid #c5d0df!important;
  box-shadow:0 2px 7px rgba(29,48,72,.075)!important;
}
html[data-bs-theme="light"] .r585-doc-page .r585-metrics span,
html[data-bs-theme="light"] .r583-page .r583-kpi span {color:#40536b!important;font-weight:650!important;opacity:1!important;}
html[data-bs-theme="light"] .r585-doc-page .r585-metrics strong,
html[data-bs-theme="light"] .r583-page .r583-kpi strong {color:#1c3049!important;opacity:1!important;font-weight:800!important;}
html[data-bs-theme="light"] .r585-doc-page .text-muted,
html[data-bs-theme="light"] .r585-doc-page .text-body-secondary,
html[data-bs-theme="light"] .r585-ai-page .text-muted,
html[data-bs-theme="light"] .app-wrapper .card .text-muted {color:#52637a!important;opacity:1!important;}
html[data-bs-theme="light"] .r585-doc-page :is(.card,.r585-doc-table),
html[data-bs-theme="light"] .r585-ai-page .card {color:#25344b!important;}
html[data-bs-theme="light"] .r585-doc-page .table thead :is(th,td) {color:#152944!important;font-weight:750!important;}
html[data-bs-theme="light"] .r585-doc-page .form-label {color:#233a57!important;font-weight:700!important;}
html[data-bs-theme="dark"] .r585-doc-page .r585-metrics > div {background:#26354a!important;border:1px solid #50647b!important;}
html[data-bs-theme="dark"] .r585-doc-page .r585-metrics span,
html[data-bs-theme="dark"] .r583-page .r583-kpi span {color:#c5d6e9!important;opacity:1!important;}
html[data-bs-theme="dark"] .r585-doc-page .r585-metrics strong,
html[data-bs-theme="dark"] .r583-page .r583-kpi strong {color:#f5f8ff!important;}
html[data-bs-theme="dark"] .r585-doc-page .text-muted,
html[data-bs-theme="dark"] .r585-ai-page .text-muted,
html[data-bs-theme="dark"] .app-wrapper .card .text-muted {color:#c2cfe2!important;opacity:1!important;}
/* Menu labels must remain visible in both themes. */
.r585-doc-navigation .menu-link .menu-label {opacity:1!important;font-weight:600;}
.r585-doc-navigation summary {opacity:1!important;}
/* Prevent low contrast outline buttons in dark hero bands. */
.r585-doc-hero .btn-outline-light {color:#fff!important;border:1px solid #e4edf8!important;background:transparent!important;font-weight:700!important;}
.r585-doc-hero .btn-outline-light:hover,.r585-doc-hero .btn-outline-light:focus {background:#fff!important;color:#163147!important;}
/* AI workflow readable and usable on narrow screens. */
.r585-ai-page {max-width:1100px;margin:0 auto 3rem;}
.r585-ai-page .r585-ai-steps {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;}
.r585-ai-page .r585-ai-steps>.card {border:1px solid var(--bs-border-color)!important;min-width:0;}
.r585-ai-page .r585-ai-step-num {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;background:#b7222d;color:#fff;font-weight:800;}
.r585-ai-page .r585-ai-prompt {font: .91rem/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;resize:vertical;min-height:245px;white-space:pre-wrap;}
.r585-ai-page .r585-ai-actions {display:flex;gap:.5rem;flex-wrap:wrap;}
.r585-ai-page .r585-ai-actions .btn {font-weight:700;}
@media(max-width:720px){.r585-ai-page .r585-ai-steps{grid-template-columns:1fr}.r585-ai-page .r585-ai-actions .btn{width:100%;}}
