/* Final platform-wide contrast layer. It intentionally loads after every legacy theme. */
:root { --v161-ink:#082b50; --v161-blue:#0f4f92; --v161-white:#fff; --v161-gold:#f2c94c; }

/* The exact dark card reported by the user. */
body #view .scheme-written-step { background:#173b63 !important; }
body #view .scheme-written-step small {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  opacity:1 !important;
  text-shadow:none !important;
}
body #view .scheme-written-step > span {
  background:#f2c94c !important;
  color:#102f50 !important;
  -webkit-text-fill-color:#102f50 !important;
}

/* Selected tabs and current route stations always use white labels on navy. */
body #view :is(.tab.active,.section-tab.active,.ux-space-tab.is-active,.stage-tabs button.active,.rubric-module-tabs button.active),
body #view :is(.ux-space-switcher button.active,.ux-space-switcher button[aria-pressed="true"]),
body #view .scheme-node.is-current {
  border-color:#f2c94c !important;
  background:#0f4f92 !important;
  color:#fff !important;
}
body #view :is(.tab.active,.section-tab.active,.ux-space-tab.is-active,.stage-tabs button.active,.rubric-module-tabs button.active) *,
body #view :is(.ux-space-switcher button.active,.ux-space-switcher button[aria-pressed="true"]) *,
body #view .scheme-node.is-current .scheme-node-copy :is(small,b,em,span) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  opacity:1 !important;
}

/* Dark route graphics, banners and module headers. */
body #view .scheme-3d-stage.is-active :is(b,small),
body #view .scheme-hero .scheme-copy :is(h2,p),
body #view .scheme-hero .scheme-current :is(strong,small),
body #view .scheme-progress-medal :is(strong,span),
body #view .m1-three-classes > header :is(h2,p),
body #view .m1-alignment-suite > header :is(h2,p),
body #view :is(.advisor-hero,.integration-hero,.premium-intro-card,.experience-builder-head,.module-title,.step-banner,.v47-dashboard-copy,.v47-next-action,.v47-owner-hero.is-owner) :is(h1,h2,h3,h4,p,li,label,strong,b,small,span),
body #view :is(.program-indicator-browser>header,.mentor-doubts>header,.instructive-route-note,.v61-practice-showcase>header,.curriculum-gateway-head) :is(h1,h2,h3,h4,p,li,strong,b,small,span),
body #view .curriculum-audit :is(h1,h2,h3,h4,p,li,footer small) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  opacity:1 !important;
  text-shadow:none !important;
}

/* Keep gold badges dark and readable even inside dark panels. */
body #view :is(.scheme-node.is-current .scheme-node-number,.scheme-3d-stage.is-active>span,.curriculum-audit .mini) {
  background:#f2c94c !important;
  color:#102f50 !important;
  -webkit-text-fill-color:#102f50 !important;
}

/* Accordions and action cards use a light surface and dark copy. */
body #view :is(.guide-accordion summary,.content-item summary,.internal-unit-list summary,.internal-objectives>summary,.expert-reference-tabs summary,.experience-rubric-tab>summary,.planning-window-btn,.experience-guidance-button,.resource-grid button,.program-indicator-list summary) {
  border-color:#7894af !important;
  background:#f7faff !important;
  color:#082b50 !important;
}
body #view :is(.guide-accordion summary,.content-item summary,.internal-unit-list summary,.internal-objectives>summary,.expert-reference-tabs summary,.experience-rubric-tab>summary,.planning-window-btn,.experience-guidance-button,.resource-grid button,.program-indicator-list summary) :is(strong,b,small,span,i) {
  color:#082b50 !important;
  -webkit-text-fill-color:#082b50 !important;
  opacity:1 !important;
}

/* Form controls and helper text never depend on low-opacity pastel colors. */
body #view :is(input,select,textarea) {
  border:2px solid #6f89a3 !important;
  background:#fff !important;
  color:#082b50 !important;
  -webkit-text-fill-color:#082b50 !important;
  opacity:1 !important;
}
body #view :is(input,textarea)::placeholder { color:#506982 !important; opacity:1 !important; }

body :is(button,a,summary):focus-visible {
  outline:4px solid #f2c94c !important;
  outline-offset:3px !important;
}

@media (prefers-contrast: more) {
  body #view :is(button,a,summary,input,select,textarea) { border-width:2px !important; }
}
