.xb-global-header,
.xb-site-footer,
.xb-global-header *,
.xb-site-footer * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.xb-global-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  color: #242a31;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid #e8ebee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  backdrop-filter: blur(16px) saturate(140%);
}

html { scroll-padding-top: 145px; }
html.xb-shell-embedded-root { scroll-padding-top: 65px; }
body.xb-shell-ready { --header-height: 129px; }

/* Shared single-line heading contract; JavaScript performs the final width fit. */
.catalog-detail-page main :is(h1, h2, h3) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.xb-header-main,
.xb-product-nav-inner,
.xb-footer-grid,
.xb-footer-bottom > div {
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto;
}

.xb-header-main {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 62px;
}

.xb-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: #171c22;
  text-decoration: none;
}

.xb-header-brand img {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  filter: drop-shadow(0 6px 12px rgba(21, 34, 50, .13));
}

.xb-brand-lockup { display: flex; align-items: flex-start; flex-direction: column; min-width: 0; }
.xb-header-brand strong { color: #17212c; font-size: 15px; font-weight: 900; line-height: 1; white-space: nowrap; }
.xb-header-brand small {
  margin-top: 5px;
  color: #a94b34;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  white-space: nowrap;
}
.xb-main-nav { display: flex; align-items: center; justify-content: center; gap: 30px; height: 62px; }
.xb-main-nav a { display: inline-flex; align-items: center; height: 100%; color: #3e454e; font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: color .16s ease; }
.xb-main-nav a:hover { color: #11161c; }
.catalog-detail-page .xb-header-main { grid-template-columns: minmax(210px, 1fr) auto; }
.catalog-detail-page .xb-main-nav { display: none; }
.catalog-detail-page .xb-mobile-menu { display: none !important; }
.xb-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.xb-language-link,
.xb-header-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 12px; border-radius: 5px; font-size: 12px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.xb-language-link { color: #303741; background: #f3f5f7; }
.xb-language-link:hover { color: #11161c; background: #e9edf1; }
.xb-header-cta { color: #fff; background: #d8512d; }
.xb-header-cta:hover { background: #bd3f20; }

.xb-product-nav {
  padding: 9px 0;
  color: #26303a;
  border-top: 1px solid rgba(232, 235, 238, .72);
  border-bottom: 1px solid rgba(218, 224, 230, .9);
  background: rgba(246, 248, 250, .94);
  box-shadow: 0 12px 30px rgba(25, 35, 45, .055);
  backdrop-filter: blur(18px) saturate(145%);
}
.xb-product-nav-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 18px;
  width: min(1280px, calc(100% - 56px));
  min-height: 46px;
  padding: 5px 6px 5px 16px;
  border: 1px solid rgba(218, 224, 230, .92);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(27, 37, 47, .065), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.xb-product-identity { display: flex; align-items: center; min-width: 0; gap: 10px; }
.xb-product-identity > span {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #f0d2c9;
  border-radius: 7px;
  color: #b33c22;
  background: #fff7f4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}
.catalog-detail-page .xb-product-identity > span { display: none; }
.xb-product-nav strong {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: visible;
  color: #202831;
  font-size: 13px;
  font-weight: 820;
  text-overflow: clip;
  white-space: nowrap;
}
.xb-product-nav strong::before {
  width: 5px;
  height: 21px;
  margin-right: 9px;
  border-radius: 5px;
  content: "";
  background: linear-gradient(180deg, #ef7a55, #c74325);
  box-shadow: 0 5px 12px rgba(216, 81, 45, .22);
}
.xb-product-nav nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid #e7ebef;
  border-radius: 11px;
  background: #f4f6f8;
}
.xb-product-nav nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  color: #69737d;
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.xb-product-nav nav a:hover { color: #b93f24; background: rgba(255,255,255,.78); }
.xb-product-nav nav a.is-active {
  color: #b83d22;
  background: #fff;
  box-shadow: 0 4px 12px rgba(31, 42, 53, .09), inset 0 0 0 1px rgba(216, 81, 45, .08);
}
.xb-product-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #ebc4b9;
  border-radius: 9px;
  color: #ad371e;
  background: linear-gradient(180deg, #fffaf8, #fff3ef);
  box-shadow: 0 5px 14px rgba(216, 81, 45, .09);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.xb-product-action::after { margin-left: 7px; content: "→"; font-size: 13px; transition: transform .18s ease; }
.xb-product-action:hover { color: #942d17; border-color: #dc9f8e; box-shadow: 0 8px 18px rgba(216, 81, 45, .14); transform: translateY(-1px); }
.xb-product-action:hover::after { transform: translateX(2px); }

.xb-mobile-menu { display: none; }
.xb-mobile-menu > summary { display: grid; align-content: center; justify-items: center; gap: 4px; width: 36px; height: 36px; border: 1px solid #dfe3e8; border-radius: 5px; background: #fff; cursor: pointer; list-style: none; }
.xb-mobile-menu > summary::-webkit-details-marker { display: none; }
.xb-mobile-menu > summary span { display: block; width: 17px; height: 2px; background: #1e252d; }
.xb-mobile-menu > nav { position: fixed; top: 62px; right: 0; left: 0; display: grid; padding: 10px 22px 18px; border-top: 1px solid #edf0f3; border-bottom: 1px solid #dfe3e8; background: rgba(255, 255, 255, .99); box-shadow: 0 18px 40px rgba(15, 23, 32, .13); }
.xb-mobile-menu > nav a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid #edf0f3; color: #20262e; font-size: 14px; font-weight: 700; text-decoration: none; }
.xb-mobile-menu > nav a:last-child { border-bottom: 0; color: #d8512d; }

.xb-site-footer {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, .62);
  background: #17191c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.xb-footer-grid { display: grid; grid-template-columns: minmax(260px, 1.45fr) repeat(2, minmax(140px, .72fr)) minmax(250px, 1fr); gap: 54px; padding-top: 62px; padding-bottom: 54px; }
.xb-footer-brand > a { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.xb-footer-brand img { width: 40px; height: 40px; border-radius: 12px; }
.xb-footer-brand > a > span { display: flex; align-items: flex-start; flex-direction: column; }
.xb-footer-brand > a strong { color: #fff; font-size: 16px; font-weight: 850; line-height: 1; }
.xb-footer-brand > a small { margin-top: 6px; color: rgba(255, 166, 124, .8); font-size: 12px; font-weight: 750; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.xb-footer-brand p { max-width: 390px; margin: 22px 0 0; color: rgba(255, 255, 255, .48); font-size: 13px; line-height: 1.8; }
.xb-footer-column { display: flex; align-items: flex-start; flex-direction: column; gap: 13px; min-width: 0; font-size: 13px; }
.xb-footer-column > strong { margin-bottom: 7px; color: #fff; font-size: 13px; }
.xb-footer-column > a { color: rgba(255, 255, 255, .56); text-decoration: none; }
.xb-footer-column > a:hover { color: #fff; }
.xb-footer-contact > span { max-width: 280px; color: rgba(255, 255, 255, .48); line-height: 1.65; }
.xb-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .4); font-size: 12px; }
.xb-footer-bottom > div { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.xb-footer-bottom nav { display: flex; align-items: center; gap: 24px; }
.xb-footer-bottom a { color: rgba(255, 255, 255, .55); text-decoration: none; }
.xb-footer-bottom a:hover { color: #fff; }

.xb-shell-embedded > .xb-global-header { display: none; }

/*
 * Cross-case readability policy
 *
 * These detail pages are often reviewed on 2K/4K desktop displays.  Narrative
 * copy inside rails, ledgers and feature strips must therefore keep a practical
 * reading size instead of inheriting the 8–10px labels used inside product UI
 * mockups.  The selectors below intentionally target editorial content only.
 */
.catalog-detail-page main :is(
  .audience-rail,
  .stakeholder-rail,
  .role-ribbon,
  .role-strand,
  .role-rail,
  .role-line,
  .persona-line,
  .journey-track,
  .journey-line,
  .journey-steps,
  .journey-grid,
  .journey-ribbon,
  .flow-grid,
  .pain-ledger,
  .problem-ledger,
  .reality-ledger,
  .trust-ledger,
  .ledger,
  .capability-item,
  .capability-lanes,
  .capability-ledger,
  .care-capabilities,
  .console-lanes,
  .console-rails,
  .console-capabilities,
  .console-modules,
  .feature-list,
  .scenario-line,
  .scenario-row,
  .scenario-grid,
  .scenario-rail,
  .scenario-index,
  .patient-list
) :is(p, article > span, li > span) {
  font-size: 13px !important;
  line-height: 1.72 !important;
}

.catalog-detail-page main :is(
  .feature-strip,
  .metric-strip,
  .metric-line,
  .problem-band,
  .mobile-feature-lines
) :is(span, p) {
  font-size: 12px !important;
  line-height: 1.68 !important;
}

.catalog-detail-page main :is(
  .audience-rail,
  .stakeholder-rail,
  .role-ribbon,
  .role-strand,
  .role-rail,
  .role-line,
  .persona-line,
  .journey-track,
  .journey-line,
  .journey-steps,
  .journey-grid,
  .journey-ribbon,
  .flow-grid,
  .ledger,
  .capability-item,
  .capability-lanes,
  .capability-ledger,
  .care-capabilities,
  .console-lanes,
  .console-rails,
  .console-capabilities,
  .console-modules,
  .feature-list,
  .feature-strip,
  .metric-strip,
  .metric-line,
  .scenario-line,
  .scenario-row,
  .scenario-grid,
  .scenario-rail,
  .scenario-index,
  .patient-list
) :is(h3, strong) {
  font-size: 16px !important;
  line-height: 1.4 !important;
}

.catalog-detail-page main :is(
  .resident-copy,
  .mobile-story__copy,
  .mobile-copy,
  .pharmacy-copy,
  .patient-copy,
  .medication-copy,
  .family-copy
) li p {
  font-size: 13px !important;
  line-height: 1.72 !important;
}

.catalog-detail-page main :is(
  .risk-boundary,
  .compliance-boundary,
  .care-boundary
) :is(p, li) {
  font-size: 13px !important;
  line-height: 1.72 !important;
}

.catalog-detail-page main :is(
  .engine-features,
  .engine-tags
) span,
.catalog-detail-page main .family-copy li span,
.catalog-detail-page main :is(
  .capability-item,
  .capability-lanes,
  .capability-ledger,
  .care-capabilities,
  .scenario-rail
) em {
  font-size: 12px !important;
  line-height: 1.6 !important;
}

.catalog-detail-page main .faq-list details p,
.catalog-detail-page main figure figcaption p {
  font-size: 13px !important;
  line-height: 1.75 !important;
}

.catalog-detail-page main figure figcaption strong {
  font-size: 14px !important;
  line-height: 1.45 !important;
}

.catalog-detail-page main figure figcaption span {
  font-size: 12px !important;
  line-height: 1.6 !important;
}

.catalog-detail-page main :is(
  .aa-heading,
  .oo-heading,
  .ph-heading,
  .cr-heading
) > p {
  font-size: 14px !important;
  line-height: 1.82 !important;
}

.catalog-detail-page main .problem-band strong {
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.catalog-detail-page main :is(
  .oa-hero__metrics,
  .rc-hero__proof,
  .cr-hero__proof,
  .cm-hero__proof,
  .ec-hero__proof,
  .ph-proof,
  .aa-proof,
  .oo-proof
) span {
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.catalog-detail-page main :is(
  .oa-hero__metrics,
  .rc-hero__proof,
  .cr-hero__proof,
  .cm-hero__proof,
  .ec-hero__proof,
  .ph-proof,
  .aa-proof,
  .oo-proof
) strong {
  font-size: 14px !important;
  line-height: 1.45 !important;
}

/* Readability coverage for the enterprise operations page family. */
.catalog-detail-page main :is(
  .cso-role-field,
  .spo-role-field,
  .scs-role-field,
  .ecm-role-bands,
  .cso-workflow,
  .spo-workflow,
  .scs-workflow,
  .ecm-workflow,
  .cso-feature-lines,
  .spo-feature-lines,
  .scs-feature-lines,
  .ecm-feature-lines,
  .cso-scenario-list,
  .spo-scenario-list,
  .scs-scenario-list,
  .ecm-scenario-list,
  .cso-console-rails,
  .spo-console-rails,
  .scs-console-rails,
  .ecm-console-rails
) :is(p, article > span, li > span) {
  font-size: 13px !important;
  line-height: 1.7 !important;
}

.catalog-detail-page main :is(
  .cso-role-field,
  .spo-role-field,
  .scs-role-field,
  .ecm-role-bands,
  .cso-workflow,
  .spo-workflow,
  .scs-workflow,
  .ecm-workflow,
  .cso-feature-lines,
  .spo-feature-lines,
  .scs-feature-lines,
  .ecm-feature-lines,
  .cso-scenario-list,
  .spo-scenario-list,
  .scs-scenario-list,
  .ecm-scenario-list,
  .cso-console-rails,
  .spo-console-rails,
  .scs-console-rails,
  .ecm-console-rails
) :is(h3, strong) {
  font-size: 17px !important;
  line-height: 1.4 !important;
}

.catalog-detail-page main :is(
  .cso-pain-rail,
  .spo-pain-rail,
  .scs-pain-rail,
  .ecm-breakpoint,
  .cso-metric-band,
  .spo-metric-band,
  .scs-metric-stack,
  .ecm-metric-stack
) p {
  font-size: 13px !important;
  line-height: 1.72 !important;
}

.catalog-detail-page main :is(
  .cso-switches,
  .spo-switches,
  .scs-switches,
  .ecm-switches
) button {
  min-height: 40px;
  font-size: 13px !important;
}

.catalog-detail-page main :is(
  .cso-output,
  .spo-output,
  .scs-output,
  .ecm-output
) {
  font-size: 13px !important;
  line-height: 1.7 !important;
}

/* Defensive cleanup for third-party decorative assistants in local previews. */
.catalog-detail-page :is(
  #chat-widget,
  #chatbot-widget,
  #floating-assistant,
  .chat-widget,
  .chatbot-widget,
  .floating-assistant,
  .assistant-widget,
  .robot-widget
) {
  display: none !important;
}

/* Progressive enhancement fallback. Every page remains fully readable when
   JavaScript is disabled or an observer cannot be created. */
html:not(.js-enabled) .catalog-detail-page :is(
  .reveal,
  .is-reveal,
  .asm-reveal,
  .tms-reveal,
  .srm-reveal,
  .plm-reveal,
  .qms-reveal,
  .clm-reveal,
  .cso-reveal,
  .spo-reveal,
  .scs-reveal,
  .ecm-reveal
) {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* CSS-only safety for local previews with scripting disabled. JavaScript uses
   exact container measurements; these narrow-screen values are the fallback. */
@media (max-width: 560px) {
  html:not(.js-enabled) .catalog-detail-page main h1 {
    font-size: clamp(10px, 3.8vw, 24px) !important;
  }
  html:not(.js-enabled) .catalog-detail-page main :is(h2, h3) {
    font-size: clamp(9px, 3.3vw, 18px) !important;
  }
}

@media (max-width: 1260px) {
  html { scroll-padding-top: 192px; }
  html.xb-shell-embedded-root { scroll-padding-top: 65px; }
  body.xb-shell-ready { --header-height: 127px; }
  .xb-product-nav { padding: 8px 0; }
  .xb-product-nav-inner { grid-template-columns: minmax(0, 1fr) auto; width: min(100% - 40px, 900px); padding-left: 14px; }
  .xb-product-nav nav { display: none; }
}

@media (max-width: 1120px) {
  .xb-header-main { grid-template-columns: minmax(0, 1fr) auto; }
  .xb-main-nav { display: none; }
  .xb-mobile-menu { display: block; }
  .xb-footer-grid { grid-template-columns: 1.2fr repeat(2, .8fr); }
  .xb-footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 176px; }
  html.xb-shell-embedded-root { scroll-padding-top: 61px; }
  body.xb-shell-ready { --header-height: 115px; }
  .xb-header-main,
  .xb-product-nav-inner,
  .xb-footer-grid,
  .xb-footer-bottom > div { width: calc(100% - 28px); }
  .xb-header-main { gap: 8px; min-height: 58px; }
  .xb-header-brand { gap: 8px; }
  .xb-header-brand img { width: 32px; height: 32px; border-radius: 10px; }
  .xb-header-brand strong { font-size: 14px; }
  .xb-header-brand small { display: none; }
  .xb-language-link { padding: 0 9px; }
  .xb-header-cta { display: none; }
  .xb-mobile-menu > nav { top: 58px; }
  .xb-product-nav { padding: 6px 0; }
  .xb-product-nav-inner { width: calc(100% - 20px); min-height: 42px; gap: 9px; padding: 4px 5px 4px 11px; border-radius: 12px; }
  .xb-product-identity > span { display: none; }
  .xb-product-nav strong { font-size: 13px; }
  .xb-product-nav strong::before { width: 4px; height: 18px; margin-right: 7px; }
  .xb-product-action { min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
  .xb-product-action::after { display: none; }
  .xb-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 22px; padding-top: 42px; padding-bottom: 38px; }
  .xb-footer-brand,
  .xb-footer-contact { grid-column: 1 / -1; }
  .xb-footer-brand p { margin-top: 16px; }
  .xb-footer-bottom > div { align-items: flex-start; flex-direction: column; gap: 10px; padding: 18px 0; }
  .xb-footer-bottom nav { align-items: flex-start; flex-direction: column; gap: 8px; }

  .catalog-detail-page main :is(
    .audience-rail,
    .stakeholder-rail,
    .role-ribbon,
    .role-strand,
    .role-rail,
    .role-line,
    .persona-line,
    .journey-track,
    .journey-line,
    .journey-steps,
    .journey-grid,
    .journey-ribbon,
    .flow-grid,
    .pain-ledger,
    .problem-ledger,
    .reality-ledger,
    .trust-ledger,
    .ledger,
    .capability-item,
    .capability-lanes,
    .capability-ledger,
    .care-capabilities,
    .console-lanes,
    .console-rails,
    .console-capabilities,
    .console-modules,
    .feature-list,
    .scenario-line,
    .scenario-row,
    .scenario-grid,
    .scenario-rail,
    .scenario-index,
    .patient-list
  ) :is(p, article > span, li > span),
  .catalog-detail-page main :is(
    .resident-copy,
    .mobile-story__copy,
    .mobile-copy,
    .pharmacy-copy,
    .patient-copy,
    .medication-copy,
    .family-copy
  ) li p {
    font-size: 12px !important;
  }
}

@media (max-width: 560px) {
  html { scroll-padding-top: 172px; }
  html.xb-shell-embedded-root { scroll-padding-top: 57px; }
}
