/* WCAG 2.2 AA remediation layer. Load after the brand and component styles. */

/* The paired rings stay distinguishable on both white glass and purple. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.tour button:focus-visible,
.tour-stage:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #44007a;
}

#main:focus {
  outline: none;
}

.skip-link {
  min-height: 44px;
  color: #44007a;
  background: #fff;
}

.desktop-navigation a,
.footer-contact a,
.footer-bottom a,
.no-script-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.desktop-navigation {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
}

.desktop-navigation a {
  white-space: normal;
  line-height: 1.5;
}

.menu-toggle,
.tour-playback {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.menu-toggle {
  align-items: center;
}

.tour-selector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
}

.tour-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 355px);
  min-width: 0;
  border-radius: 21px;
}

.tour-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tour-playback[disabled] {
  cursor: default;
  opacity: .7;
}

.tour-steps button {
  min-height: 58px;
  overflow: visible;
}

.tour-steps button[aria-pressed="true"] {
  border-bottom-color: #fff;
}

.tour-steps button[aria-pressed="true"] > span:nth-child(2) {
  font-weight: 600;
}

.tour-steps button > span:nth-child(2) {
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tour-step-number {
  font-size: 10px;
}

.tour-caption,
.tour-description,
.tour-motion-note,
.tour-transcript {
  font-size: 12px;
  line-height: 1.7;
}

.tour-caption {
  flex-wrap: wrap;
}

.tour-caption-length {
  font-size: 10px;
}

.tour-motion-note {
  margin: 12px 2px 0;
  color: #e2d1ed;
}

.tour-transcript {
  margin-top: 5px;
  color: #e2d1ed;
}

.tour-transcript summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tour-transcript summary::after {
  content: "+";
  margin-left: 10px;
  font-size: 17px;
}

.tour-transcript[open] summary::after {
  content: "−";
}

.tour-transcript ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.tour-transcript li {
  padding: 5px 0;
}

.tour-transcript strong {
  color: #fff;
  font-weight: 600;
}

/* Keep pale surfaces stable where text needs a predictable contrast ratio. */
.platform-section,
.microsoft-section,
.relationship-visual {
  background-color: #f8f4fc;
}

.item-number,
.sample-label,
.client-summary small,
.client-state,
.connection-node,
.detail-heading p,
.detail-rows > div,
.relationship-bottom {
  color: #65516f;
}

.tour-window-bar,
.tour-fallback-window {
  color: #65516f;
}

/* The Business Central illustration is decorative, but its visible labels
   should still be readable rather than relying on a decorative exception. */
.tour-workspace-nav,
.tour-workspace-company,
.tour-breadcrumb,
.tour-date,
.tour-metric > span:first-child,
.tour-metric small,
.tour-table-heading > span,
.tour-table-header,
.tour-activity-strip,
.tour-panel-top,
.tour-task-panel p,
.tour-task-panel label,
.tour-panel-actions,
.tour-success-toast div > span,
.tour-toast-close {
  color: #56616d;
}

.tour-app-search {
  color: #fff;
  background: #00555b;
}

.tour-status-green,
.tour[data-tour-phase="3"] .tour-target-status,
.tour-review-note {
  color: #42664e;
}

.connection-node .icon {
  border-color: #8a729c;
}

.connection-node.active .icon {
  border-color: #44007a;
}

.connection-controls button,
.questions summary {
  min-height: 48px;
}

.hero-note,
.product-footnote,
.platform-category,
.sample-label,
.client-summary small,
.client-state,
.connection-caption small,
.relationship-bottom,
.contact-copy > small,
.footer-main p,
.footer-contact,
.footer-contact .corefocus-link,
.footer-bottom {
  font-size: 12px;
}

/* Functional content wraps rather than clipping when text settings change. */
h1, h2, h3, h4, p, a, button, summary {
  overflow-wrap: anywhere;
}

.hero h1 > span {
  max-width: 100%;
}

.section-heading > *,
.connected-copy,
.client-summary > div,
.detail-heading > div,
.footer-main > * {
  min-width: 0;
}

.foundation-bar,
.foundation-names,
.relationship-top,
.client-summary,
.footer-bottom,
.footer-bottom > div,
.hero-actions {
  flex-wrap: wrap;
}

.foundation-names > span {
  white-space: normal;
}

.detail-rows > div > span:not(.detail-line) {
  min-width: 0;
}

.no-script-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding: 18px 22px;
  margin: 12px auto;
  color: #fff;
  border: 1px solid #ffffff45;
  border-radius: 16px;
  background: #310956;
  flex-basis: 100%;
  width: 100%;
}

.site-header:has(.no-script-navigation) { flex-wrap: wrap; }
.site-header > noscript { flex-basis: 100%; width: 100%; }

.no-script-navigation a {
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tour-static {
  padding: clamp(22px, 4vw, 38px);
  min-height: 270px;
  border: 1px solid #ffffff66;
  border-radius: 20px;
  color: #24143c;
  background: #f8f4fc;
}

.tour-static p,
.tour-static li {
  color: #65516f;
}

.tour-static .eyebrow { color: #44007a; }
.tour-static-title { font-size: 24px; line-height: 1.4; margin-block: 15px; }
.tour-static ol { padding-left: 22px; margin-block: 20px; }
.tour-static li { padding-block: 6px; }
.connection-controls button:disabled { opacity: 1; cursor: default; }

.tour-static-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid #d9cce4;
  border-radius: 12px;
  background: #fff;
  margin-block: 18px;
}

.tour-static-frame > img {
  position: absolute;
  max-width: none;
  height: auto;
}

.tour-static .tour-static-transcript summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 6px;
  font-size: 13px;
  color: #44007a;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tour-static .tour-static-transcript ol {
  font-size: 13px;
  line-height: 1.8;
}

@media (min-width: 901px) {
  .no-script-navigation { display: none; }
}

/* Separate the two business applications from their supporting platforms. */
.application-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foundation-platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }

@media (min-width: 601px) {
  .application-platforms .microsoft-platform,
  .foundation-platforms .microsoft-platform { border-bottom: 0; }
  .foundation-platforms .microsoft-platform { border-right: 1px solid var(--line); }
  .foundation-platforms .microsoft-platform:last-child { border-right: 0; }
}

@media (max-width: 600px) {
  .tour-selector-row { gap: 10px; }
  .tour-tabs button { padding-inline: 7px; font-size: 12px; }
  .tour-caption-length { display: none; }
  .tour-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tour-steps button { padding: 10px 6px; min-height: 62px; }
  .tour-description { min-height: 0; }
  .hero-note { gap: 8px; }
  .hero-note > span:last-child { max-width: 100%; }
  .product-footnote { line-height: 1.8; }
  .foundation-bar > p { font-size: 12px; }
  .principle p, .microsoft-platform > p:last-child { font-size: 13px; }
  .microsoft-platforms { grid-template-columns: 1fr; }
  .microsoft-platform, .microsoft-platform:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .microsoft-platform:last-child { border-bottom: 0; }
  .microsoft-platform .platform-category { min-height: 0; }
  .platform-logo { margin-bottom: 18px; }
  .client-summary { align-items: flex-start; }
  .client-summary h3 { font-size: 23px; line-height: 1.3; }
  .client-summary small { display: block; line-height: 1.6; }
  .detail-line { display: none; }
  .detail-rows > div { font-size: 12px; }
  .footer-main p, .footer-contact, .footer-contact .corefocus-link, .footer-bottom { font-size: 12px; }
  .footer-bottom > div { gap: 8px 20px; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-product::before { filter: none; }
}

@media (forced-colors: active) {
  a:focus-visible, button:focus-visible, summary:focus-visible,
  [tabindex]:focus-visible, .tour button:focus-visible, .tour-stage:focus-visible {
    outline: 3px solid Highlight;
    box-shadow: none;
  }
  .item-number, .client-state, .connection-node, .detail-heading p,
  .detail-rows > div, .relationship-bottom, .tour-motion-note,
  .tour-transcript, .tour-transcript strong, .tour-static,
  .tour-static p, .tour-static li, .no-script-navigation {
    color: CanvasText;
  }
  .platform-section, .microsoft-section, .relationship-visual,
  .tour-static, .no-script-navigation { background: Canvas; border-color: CanvasText; }
}
