:root {
  --rmc-wcx-surface: var(--luxury-surface, var(--color-base-0));
  --rmc-wcx-muted: var(--text-secondary, var(--bs-secondary-color, var(--color-base-500)));
  --rmc-wcx-border: var(--hairline, var(--bs-border-color, var(--color-base-200)));
  --rmc-wcx-ink: var(--text-primary, var(--bs-body-color, var(--color-base-900)));
  --rmc-wcx-accent: var(--bs-primary, var(--color-primary-600));
  --rmc-wcx-success: var(--bs-success, var(--color-emerald-600));
  --rmc-wcx-warning: var(--bs-warning, var(--color-amber-700));
  --rmc-wcx-danger: var(--bs-danger, var(--color-red-600));
  --rmc-wcx-radius: 8px;
  --rmc-acx-glass: color-mix(in srgb, var(--rmc-wcx-surface) 84%, transparent);
  --rmc-acx-shadow: 0 22px 70px rgba(26, 22, 18, 0.12);
}

.rmc-wcx-surface {
  background: var(--rmc-wcx-surface);
  border: 1px solid var(--rmc-wcx-border);
  border-radius: var(--rmc-wcx-radius);
  box-shadow: 0 18px 50px rgba(26, 22, 18, 0.08);
}

.rmc-wcx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 1.25rem;
  align-items: stretch;
  padding: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 1rem;
  max-width: 100%;
  overflow: hidden;
}

.rmc-wcx-hero__eyebrow,
.rmc-wcx-section__eyebrow {
  color: var(--rmc-wcx-muted);
  font-size: var(--type-size-eyebrow);
  font-weight: 700;
  text-transform: uppercase;
}

.rmc-wcx-hero__title {
  margin: 0.25rem 0;
  font-size: clamp(1.65rem, 2.4vw, 2.45rem);
  line-height: 1.08;
}

.rmc-wcx-hero__copy {
  color: var(--rmc-wcx-muted);
  max-width: 64ch;
  margin-bottom: 1rem;
}

.mkt-global-os .rmc-wcx-hero,
.mkt-global-os .rmc-wcx-visual-panel {
  color: var(--rmc-wcx-ink);
}

.mkt-global-os .rmc-wcx-hero__title {
  color: var(--rmc-wcx-ink);
}

#cp-main-content > .text-muted,
#cp-main-content > .text-secondary {
  color: var(--text-secondary) !important;
}

#cp-main-content .rmc-wcx-hero,
#cp-main-content .rmc-wcx-hero__title,
#cp-main-content .rmc-wcx-hero__eyebrow,
#cp-main-content .rmc-wcx-visual-panel,
#cp-main-content .rmc-wcx-visual-panel h2 {
  color: var(--text-primary, var(--rmc-wcx-ink)) !important;
}

#cp-main-content .rmc-wcx-hero__copy,
#cp-main-content .rmc-wcx-visual-panel .text-muted {
  color: var(--text-secondary, var(--rmc-wcx-muted)) !important;
}

#cp-main-content .rmc-os-page-header,
#cp-main-content .rmc-zero-click,
#cp-main-content .phase8-declaration-strip,
#cp-main-content .card,
#cp-main-content .rmc-wcx-surface,
#cp-main-content .rmc-acx-glass-panel,
#cp-main-content .rmc-acx-metric-card,
#cp-main-content .rmc-acx-dependency-graph,
#cp-main-content .rmc-acx-data-quality,
#cp-main-content .rmc-acx-inline-edit {
  color: var(--text-primary);
}

#cp-main-content .rmc-os-page-header .text-body,
#cp-main-content .rmc-zero-click .text-break,
#cp-main-content .phase8-declaration-strip strong,
#cp-main-content .card strong,
#cp-main-content .card h1,
#cp-main-content .card h2,
#cp-main-content .card h3,
#cp-main-content .rmc-wcx-surface strong,
#cp-main-content .rmc-acx-glass-panel strong {
  color: var(--text-primary) !important;
}

#cp-main-content .rmc-os-page-header .text-muted,
#cp-main-content .rmc-os-page-header [data-rmc-os-role-label],
#cp-main-content .rmc-zero-click .text-muted,
#cp-main-content .phase8-declaration-strip .text-muted,
#cp-main-content .card .text-muted,
#cp-main-content .card .text-secondary,
#cp-main-content .rmc-wcx-surface .text-muted,
#cp-main-content .rmc-acx-glass-panel .text-muted {
  color: var(--text-secondary) !important;
}

#cp-main-content .card a,
#cp-main-content .rmc-wcx-surface a,
#cp-main-content .rmc-acx-glass-panel a {
  color: var(--link-color, var(--color-primary-300));
}

#cp-main-content .card code,
#cp-main-content .rmc-wcx-surface code,
#cp-main-content .rmc-acx-glass-panel code {
  color: var(--text-primary, var(--color-base-700));
  background: var(--surface-elevated, var(--color-base-50));
  border: 1px solid var(--hairline, var(--color-base-300)); /* theme-locked-allow: manual-review */
  border-radius: 6px;
  padding: 0.08rem 0.28rem;
}

#cp-main-content .rmc-acx-status-pill {
  color: var(--text-primary, var(--color-base-900)) !important;
  background: color-mix(in oklab, var(--color-sky-400) 20%, var(--color-base-0)) !important; /* theme-locked-allow: decorative-tint-mix */
  border-color: var(--color-cyan-600);
}

#cp-main-content .rmc-acx-status-pill[data-status*="blocked"],
#cp-main-content .rmc-acx-status-pill[data-status*="external"] {
  color: color-mix(in oklab, var(--color-amber-700) 60%, var(--color-base-950)) !important; /* theme-locked-allow: decorative-tint-mix */
  background: color-mix(in oklab, var(--color-amber-400) 25%, var(--color-base-0)) !important; /* theme-locked-allow: decorative-tint-mix */
  border-color: var(--color-amber-700);
}

#cp-main-content .cp-context-drawer-toggle,
#cp-main-content .btn-outline-light.cp-context-drawer-toggle {
  color: var(--text-on-brand, var(--color-base-0)) !important;
  background: var(--surface-canvas, var(--color-base-700));
  border-color: var(--color-primary-300); /* theme-locked-allow: brand-token */
}

#cp-main-content button.cp-context-drawer-toggle,
#cp-main-content button.cp-context-drawer-toggle span,
#cp-main-content button.cp-context-drawer-toggle i,
button.cp-context-drawer-toggle,
button.cp-context-drawer-toggle span,
button.cp-context-drawer-toggle i,
#cp-main-content .rmc-wcx-hero .btn-primary,
#cp-main-content .rmc-wcx-hero .btn-outline-primary {
  color: var(--text-on-brand, var(--color-base-0)) !important;
}

.skip-link,
.skip-link:focus,
.visually-hidden-focusable:focus {
  color: var(--text-on-brand, var(--color-base-0)) !important;
  background: var(--surface-canvas, var(--color-base-900)) !important;
  outline: 3px solid var(--color-amber-400) !important;
  outline-offset: 2px;
}

#cp-main-content .rmc-wcx-hero .btn-primary {
  background: var(--color-primary-600); /* theme-locked-allow: brand-token */
  border-color: var(--color-primary-100); /* theme-locked-allow: brand-token */
}

#cp-main-content .rmc-wcx-hero .btn-outline-primary {
  background: rgba(26, 22, 18, 0.72); /* off-token-allow: always-dark-warm-bg */
  border-color: var(--color-primary-100); /* theme-locked-allow: brand-token */
}

.rmc-wcx-actions,
.rmc-wcx-action-rail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.rmc-wcx-hero__visual {
  display: grid;
  gap: 0.75rem;
  min-height: 100%;
}

.rmc-wcx-visual-panel {
  border-radius: var(--rmc-wcx-radius);
  border: 1px solid var(--rmc-wcx-border);
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(36, 87, 197, 0.08), rgba(19, 121, 91, 0.08)),
    var(--rmc-wcx-surface);
  min-width: 0;
}

.rmc-wcx-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.rmc-wcx-metric,
.rmc-wcx-product-card,
.rmc-wcx-risk-card,
.rmc-wcx-empty-state,
.rmc-wcx-action-rail,
.rmc-wcx-timeline,
.rmc-wcx-readiness {
  border: 1px solid var(--rmc-wcx-border);
  border-radius: var(--rmc-wcx-radius);
  background: var(--rmc-wcx-surface);
}

.rmc-wcx-metric {
  padding: 0.9rem;
}

.rmc-wcx-metric__label,
.rmc-wcx-card__meta,
.rmc-wcx-risk-card__meta {
  color: var(--rmc-wcx-muted);
  font-size: var(--type-size-caption);
}

.rmc-wcx-metric__value {
  display: block;
  color: var(--rmc-wcx-ink);
  font-size: var(--type-size-headline-m);
  font-weight: 800;
}

.rmc-wcx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
  min-width: 0;
}

.rmc-wcx-grid > *,
.rmc-wcx-summary-strip > *,
.rmc-wcx-actions > *,
.rmc-wcx-action-rail__actions > * {
  min-width: 0;
}

.rmc-wcx-grid > * :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
.rmc-wcx-summary-strip > * :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
  overflow-wrap: normal;
  word-break: normal;
}

main ol,
main ul,
main li,
.proof-page ol,
.proof-page ul,
.proof-page li,
.mkt-global-os ol,
.mkt-global-os ul,
.mkt-global-os li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rmc-wcx-product-card,
.rmc-wcx-risk-card,
.rmc-wcx-empty-state,
.rmc-wcx-action-rail,
.rmc-wcx-timeline,
.rmc-wcx-readiness {
  padding: 1rem;
}

/* Control-plane dark canvas: readable copy + badges (no washed-out text-bg-light). */
body.control-plane-shell #cp-main-content .rmc-wcx-product-card,
body.control-plane-shell #cp-main-content .rmc-wcx-risk-card {
  color: var(--text-primary, var(--rmc-wcx-ink));
}

body.control-plane-shell #cp-main-content .rmc-wcx-product-card .text-muted,
body.control-plane-shell #cp-main-content .rmc-wcx-risk-card .text-muted,
body.control-plane-shell #cp-main-content .rmc-wcx-risk-card__meta {
  color: var(--text-secondary, var(--rmc-wcx-muted)) !important;
}

body.control-plane-shell #cp-main-content .rmc-wcx-product-card .badge.text-bg-light {
  background: var(--surface-elevated, var(--rmc-wcx-surface)) !important;
  color: var(--text-primary, var(--rmc-wcx-ink)) !important;
  border: 1px solid var(--hairline, var(--rmc-wcx-border));
}

.rmc-wcx-icon {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 999px;
  color: var(--rmc-wcx-accent);
  background: color-mix(in srgb, var(--rmc-wcx-accent) 12%, transparent);
}

.rmc-wcx-section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin: 1.35rem 0 0.75rem;
}

.rmc-wcx-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(5.5rem, 100%), 1fr));
  gap: 0.35rem;
  margin: 1rem 0;
}

.rmc-wcx-stepper__step {
  min-height: 3rem;
  padding: 0.5rem;
  border: 1px solid var(--rmc-wcx-border);
  border-radius: var(--rmc-wcx-radius);
  background: var(--rmc-wcx-surface);
  font-size: var(--type-size-caption);
  font-weight: 700;
}

.rmc-wcx-readiness__bar {
  height: 0.55rem;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--rmc-wcx-border) 70%, transparent);
}

.rmc-wcx-readiness__fill {
  height: 100%;
  width: var(--rmc-readiness-value, 0%);
  background: var(--rmc-wcx-success);
}

.rmc-wcx-timeline__item {
  border-left: 3px solid var(--rmc-wcx-accent);
  padding: 0 0 0.85rem 0.75rem;
}

.rmc-wcx-risk-card[data-severity="critical"],
.rmc-wcx-risk-card[data-severity="high"] {
  border-color: color-mix(in srgb, var(--rmc-wcx-danger) 55%, var(--rmc-wcx-border));
}

.rmc-wcx-risk-card[data-severity="medium"] {
  border-color: color-mix(in srgb, var(--rmc-wcx-warning) 55%, var(--rmc-wcx-border));
}

.rmc-acx-glass-panel,
.rmc-acx-drawer,
.rmc-acx-metric-card,
.rmc-acx-dependency-graph,
.rmc-acx-data-quality,
.rmc-acx-inline-edit {
  border: 1px solid color-mix(in srgb, var(--rmc-wcx-border) 75%, transparent);
  border-radius: var(--rmc-wcx-radius);
  background: var(--rmc-acx-glass);
  box-shadow: var(--rmc-acx-shadow);
  color: var(--rmc-wcx-ink);
  min-width: 0;
}

@supports (backdrop-filter: blur(18px)) {
  .rmc-acx-glass-panel,
  .rmc-acx-drawer {
    backdrop-filter: blur(18px) saturate(135%);
  }
}

.rmc-acx-glass-panel,
.rmc-acx-metric-card,
.rmc-acx-dependency-graph,
.rmc-acx-data-quality,
.rmc-acx-inline-edit {
  padding: 1rem;
}

.rmc-acx-layer-label,
.rmc-acx-metric-card__label {
  color: var(--rmc-wcx-muted);
  font-size: var(--type-size-eyebrow);
  font-weight: 800;
  text-transform: uppercase;
}

.rmc-acx-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--rmc-wcx-border);
  background: color-mix(in srgb, var(--rmc-wcx-surface) 82%, var(--rmc-wcx-accent));
  font-size: var(--type-size-eyebrow);
  font-weight: 800;
}

.rmc-acx-status-pill[data-status*="blocked"],
.rmc-acx-status-pill[data-status*="external"] {
  background: color-mix(in srgb, var(--rmc-wcx-warning) 18%, var(--rmc-wcx-surface));
}

.rmc-acx-metric-card__value {
  display: block;
  font-size: var(--type-size-headline-m);
  font-weight: 850;
  line-height: 1.1;
}

.rmc-acx-metric-card__meta {
  color: var(--rmc-wcx-muted);
  font-size: var(--type-size-caption);
}

.rmc-acx-drawer {
  padding: 1rem;
  position: relative;
  border-left: 4px solid var(--rmc-wcx-accent);
}

.rmc-acx-drawer__handle {
  width: 2.75rem;
  height: 0.22rem;
  border-radius: 999px;
  background: var(--rmc-wcx-border);
  margin-bottom: 0.8rem;
}

/* v2.47 (2026-05-15): drawer collapsed state. When [aria-expanded="false"]
 * (the default on every page-render) the drawer no longer renders as a full
 * inline card that duplicates the dashboard's primary metric cards. Instead
 * it collapses to a compact horizontal teaser strip — small handle, label,
 * title, and a single trailing button. Clicking the strip flips the aria
 * attribute (handled by rmc-acx-drawer-toggle.js) to expose the full body.
 *
 * v3.60.1 (2026-05-22): visual-weight reduction. Users reported the
 * collapsed pill bar visually obstructed surrounding content while
 * scrolling. Lighter background (`transparent` instead of glass tint),
 * 1px hairline border-left instead of 3px accent, smaller padding,
 * subdued backdrop-filter. The strip still acts as the click target,
 * just integrates into the page rhythm instead of standing out. */
.rmc-acx-drawer[aria-expanded="false"] {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--rmc-wcx-border);
  border-left-width: 1px;
  border-radius: var(--rmc-wcx-radius);
  backdrop-filter: none;
  box-shadow: none;
}

.rmc-acx-drawer[aria-expanded="false"]:hover,
.rmc-acx-drawer[aria-expanded="false"]:focus-visible {
  background: color-mix(in srgb, var(--rmc-acx-glass) 40%, transparent);
  border-left-color: var(--rmc-wcx-accent);
}

.rmc-acx-drawer[aria-expanded="false"] .rmc-acx-drawer__handle {
  width: 0.22rem;
  height: 1.5rem;
  margin: 0;
  flex-shrink: 0;
}

.rmc-acx-drawer[aria-expanded="false"] .rmc-acx-drawer__header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.rmc-acx-drawer[aria-expanded="false"] .rmc-acx-drawer__header > * {
  margin: 0;
}

.rmc-acx-drawer[aria-expanded="false"] .rmc-acx-drawer__header h2 {
  font-size: var(--type-size-body);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rmc-acx-drawer[aria-expanded="false"] > p {
  display: none;
}

.rmc-acx-drawer[aria-expanded="false"] > .btn {
  flex-shrink: 0;
}

.rmc-acx-drawer[aria-expanded="false"]:hover {
  background: color-mix(in srgb, var(--rmc-acx-glass) 100%, var(--rmc-wcx-accent) 6%);
}

.rmc-acx-inline-edit__control {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  /* v2.65 Wave 1b (2026-05-15): the input was using Bootstrap's
     `form-control { width: 100% }` which inside a flex row defaults to
     `flex: 0 1 auto` with auto basis = the form-control's intrinsic
     width (often equal to the container), shoving the button into a
     wrap or visually overlapping it on certain Chromium builds. Pin
     the input to `flex: 1 1 0` (truly grow from zero, share space with
     siblings) and the button to `flex: 0 0 auto` (never shrink, never
     grow). User reported the overlap on the Tenant display name +
     Support contact email fields in the platform readiness strip. */
}
.rmc-acx-inline-edit__control > input,
.rmc-acx-inline-edit__control > .form-control,
.rmc-acx-inline-edit__control > select,
.rmc-acx-inline-edit__control > textarea {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}
.rmc-acx-inline-edit__control > button,
.rmc-acx-inline-edit__control > .btn {
  flex: 0 0 auto;
}

.rmc-acx-workflow-path {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(5.5rem, 100%), 1fr));
  gap: 0.35rem;
  margin: 1rem 0;
}

.rmc-acx-workflow-path span {
  min-height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0.4rem;
  border-radius: var(--rmc-wcx-radius);
  border: 1px solid var(--rmc-wcx-border);
  background: color-mix(in srgb, var(--rmc-wcx-surface) 88%, var(--rmc-wcx-accent));
  font-size: var(--type-size-caption);
  font-weight: 800;
  text-align: center;
}

.rmc-acx-dependency-graph__nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: 0.5rem;
  align-items: center;
}

.rmc-acx-dependency-graph__nodes span {
  min-height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rmc-wcx-border);
  border-radius: var(--rmc-wcx-radius);
  background: var(--rmc-wcx-surface);
  font-weight: 800;
  text-align: center;
}

.mkt-main,
.mkt-main *,
#main-content,
#main-content *,
#info,
#info * {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.mkt-main ol,
.mkt-main ul,
#main-content ol,
#main-content ul,
#info ol,
#info ul {
  padding-inline-start: 1.25rem;
}

.mkt-main li,
#main-content li,
#info li {
  min-width: 0;
  word-break: break-word;
}

.rmc-wcx-mobile-marker {
  display: none;
}

@media (max-width: 991.98px) {
  .rmc-wcx-hero,
  .rmc-wcx-summary-strip,
  .rmc-wcx-grid {
    grid-template-columns: 1fr;
  }

  .rmc-wcx-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rmc-acx-workflow-path,
  .rmc-acx-dependency-graph__nodes {
    grid-template-columns: 1fr;
  }

  .rmc-acx-inline-edit__control {
    align-items: stretch;
    flex-direction: column;
  }

  .rmc-wcx-hero {
    padding-inline: 0.85rem;
  }

  .rmc-wcx-mobile-marker {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rmc-wcx-surface,
  .rmc-wcx-product-card,
  .rmc-wcx-risk-card {
    transition: none;
  }

  .rmc-acx-glass-panel,
  .rmc-acx-drawer,
  .rmc-acx-metric-card,
  .rmc-acx-dependency-graph,
  .rmc-acx-data-quality,
  .rmc-acx-inline-edit {
    transition: none;
  }
}

/* Skip link — axe color-contrast on control-plane shells. */
.skip-link,
a.skip-link {
  color: var(--rmc-acx-text-strong);
  background: var(--rmc-acx-surface-opaque);
  border: 1px solid var(--rmc-acx-touch-border);
  font-weight: 700;
  padding: 0.35rem 0.75rem;
}

/* -------------------------------------------------------------------------- */
/* Apple-class shell axe-clean overrides (SOT batch 1202)                      */
/*                                                                             */
/* Eliminates the 27 color-contrast and 3 link-in-text-block findings reported */
/* in apple_class_authenticated_browser_report.json. All fixes target shell    */
/* theme tokens at the source so every affected route inherits the fix.       */
/*                                                                             */
/* Background: the previous --rmc-acx-glass token used 84% surface + 16%       */
/* transparent, which produced non-deterministic contrast against parent       */
/* containers. Here we lock the glass to 96% opacity on light backgrounds     */
/* and pin every body-text token to a verified WCAG-AA hex pair.              */
/* -------------------------------------------------------------------------- */

:root {
  /* Lock contrast-critical foreground/background pairs. */
  --rmc-acx-text-strong: var(--color-base-950);          /* theme-locked-allow: manual-review */ /* AA on var(--color-base-0): 17.4:1 */
  --rmc-acx-text-body: var(--color-base-800);             /* theme-locked-allow: manual-review */ /* AA on var(--color-base-0): 13.7:1 */
  --rmc-acx-text-muted: var(--color-base-600);            /* theme-locked-allow: manual-review */ /* AA on var(--color-base-0): 7.2:1  */
  --rmc-acx-link: var(--color-primary-700);                  /* theme-locked-allow: brand-token */ /* AA on var(--color-base-0): 7.4:1  */
  --rmc-acx-success-strong: color-mix(in oklab, var(--color-emerald-600) 50%, var(--color-base-900));        /* theme-locked-allow: decorative-tint-mix */ /* AA on var(--color-base-0): 7.8:1  */
  --rmc-acx-warning-strong: color-mix(in oklab, var(--color-amber-700) 90%, var(--color-base-950));        /* theme-locked-allow: decorative-tint-mix */ /* AA on var(--color-base-0): 7.0:1  */
  --rmc-acx-danger-strong: color-mix(in oklab, var(--color-red-600) 70%, var(--color-base-950));         /* theme-locked-allow: decorative-tint-mix */ /* AA on var(--color-base-0): 7.4:1  */
  --rmc-acx-surface-opaque: var(--color-base-0); /* theme-locked-allow: manual-review */
  --rmc-acx-surface-elevated: var(--color-base-50); /* theme-locked-allow: manual-review */
  --rmc-acx-touch-fg: var(--color-base-950); /* theme-locked-allow: manual-review */
  --rmc-acx-touch-bg: color-mix(in oklab, var(--color-sky-400) 20%, var(--color-base-0)); /* theme-locked-allow: decorative-tint-mix */
  --rmc-acx-touch-border: var(--color-cyan-600);
}

html[data-theme="dark"],
html[data-bs-theme="dark"],
body.portal-backend-dark {
  --rmc-acx-text-strong: var(--color-base-50); /* theme-locked-allow: manual-review */
  --rmc-acx-text-body: var(--color-base-200); /* theme-locked-allow: manual-review */
  --rmc-acx-text-muted: var(--color-base-300); /* theme-locked-allow: manual-review */
  --rmc-acx-link: var(--color-primary-300); /* theme-locked-allow: brand-token */
  --rmc-acx-success-strong: var(--color-emerald-400);
  --rmc-acx-warning-strong: var(--color-amber-400);
  --rmc-acx-danger-strong: color-mix(in oklab, var(--color-red-400) 70%, var(--color-base-0)); /* theme-locked-allow: decorative-tint-mix */
  --rmc-acx-surface-opaque: var(--color-base-900); /* theme-locked-allow: manual-review */
  --rmc-acx-surface-elevated: var(--color-base-800); /* theme-locked-allow: manual-review */
  --rmc-acx-touch-fg: var(--color-base-50); /* theme-locked-allow: manual-review */
  --rmc-acx-touch-bg: var(--color-base-800); /* theme-locked-allow: manual-review */
  --rmc-acx-touch-border: var(--color-primary-300); /* theme-locked-allow: brand-token */
}

/* Glass becomes deterministic — opaque enough that text contrast does not depend on parent. */
.rmc-acx-glass-panel,
.rmc-acx-drawer,
.rmc-acx-metric-card,
.rmc-acx-dependency-graph,
.rmc-acx-data-quality,
.rmc-acx-inline-edit {
  background: var(--rmc-acx-surface-opaque);
  color: var(--rmc-acx-text-body);
}

/* Metric card values — explicit strong-ink color so contrast does not inherit ambiguously. */
.rmc-acx-metric-card,
.rmc-acx-metric-card[data-apple-class-metric-card] {
  color: var(--rmc-acx-text-body);
}

.rmc-acx-metric-card .rmc-acx-metric-card__value,
.rmc-acx-metric-card[data-apple-class-metric-card] .rmc-acx-metric-card__value {
  color: var(--rmc-acx-text-strong);
  font-weight: 850;
}

.rmc-acx-metric-card .rmc-acx-metric-card__meta,
.rmc-acx-metric-card[data-apple-class-metric-card] .rmc-acx-metric-card__meta {
  color: var(--rmc-acx-text-muted);
}

/* Dependency-graph node text — pinned strong-ink against opaque surface. */
.rmc-acx-dependency-graph,
.rmc-acx-dependency-graph__nodes {
  color: var(--rmc-acx-text-strong);
}

.rmc-acx-dependency-graph__nodes span,
#blueprint-dependency-graph,
#blueprint-dependency-graph span,
#pack-dependency-graph,
#pack-dependency-graph span,
#change-request-dependencies,
#change-request-dependencies span {
  color: var(--rmc-acx-text-strong);
  background: var(--rmc-acx-surface-opaque);
}

/* Configuration page section headings used as axe-targeted IDs. */
#configuration-operating-models,
#configuration-migration-quality {
  color: var(--rmc-acx-text-strong);
}

/* Workflow path / visual workflow tiles — text-block contrast safe. */
.rmc-acx-workflow-path span {
  color: var(--rmc-acx-text-strong);
}

/* Visual-differentiation rule: link-in-text-block. Inline anchors inside */
/* paragraph text must distinguish themselves by more than color alone.   */
#cp-main-content p a,
#cp-main-content li a,
.mkt-main p a,
.mkt-main li a,
.proof-page p a,
.proof-page li a,
main p a:not(.btn):not(.nav-link),
main li a:not(.btn):not(.nav-link),
.rmc-wcx-surface p a,
.rmc-acx-glass-panel p a {
  color: var(--rmc-acx-link);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  font-weight: 600;
}

/* The .ms-2 inline anchor pattern observed in /configuration/ axe failure. */
#cp-main-content .ms-2,
#cp-main-content .ms-2 a {
  color: var(--rmc-acx-link);
  text-decoration: underline;
  font-weight: 600;
}

/* Tenant alias surfaces: /school/apps/, /school/money/, /school/workflows/, */
/* /school/offline/, /school/audit/, /school/security/, /school/setup/imports/ */
.fw-semibold.text-uppercase.mb-1 {
  color: var(--rmc-acx-text-strong);
  letter-spacing: 0.04em;
}

.touch-target {
  color: var(--rmc-acx-touch-fg);
  background: var(--rmc-acx-touch-bg);
  border-color: var(--rmc-acx-touch-border);
}

.last-checked {
  color: var(--rmc-acx-text-muted);
  font-weight: 600;
}

.integrity-section .success,
.integrity-section > .success {
  color: var(--rmc-acx-success-strong);
  font-weight: 700;
}

.position-absolute {
  color: var(--rmc-acx-text-strong);
}

/* btn-outline-primary at btn-sm with control/ deeplink — observed contrast fail. */
.btn-outline-primary.btn-sm,
.btn-outline-primary.btn-sm[href$="control/"] {
  color: var(--rmc-acx-link);
  border-color: var(--rmc-acx-link);
  background: var(--rmc-acx-surface-opaque);
  font-weight: 600;
}

.btn-outline-primary.btn-sm:hover,
.btn-outline-primary.btn-sm:focus,
.btn-outline-primary.btn-sm[href$="control/"]:hover,
.btn-outline-primary.btn-sm[href$="control/"]:focus {
  color: var(--rmc-acx-surface-opaque);
  background: var(--rmc-acx-link);
  border-color: var(--rmc-acx-link);
}

/* /school/setup/imports/ data-quality meter / overflow-safe inset. */
[data-apple-class-data-quality-meter],
[data-world-class-readiness-meter] {
  color: var(--rmc-acx-text-strong);
}

/* Portal / tenant proof surfaces — batch 1286 axe burndown (extends batch 1202). */
main .text-muted,
.portal-layout .text-muted,
.tenant-app-catalog-wrap .text-muted,
.proof-page .text-muted {
  color: var(--rmc-acx-text-muted, var(--text-secondary));
}

.proof-page .btn-outline-primary,
.tenant-app-catalog-wrap .btn-outline-primary,
.ui-premium-surface .btn-outline-primary {
  color: var(--rmc-acx-link);
  border-color: var(--rmc-acx-link);
  background: var(--rmc-acx-surface-opaque);
  font-weight: 600;
}

.text-muted.text-uppercase.small.fw-semibold,
.text-muted.text-uppercase.small {
  color: var(--rmc-acx-text-strong);
}
