﻿.legacy-refresh {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  isolation: isolate;
}

.page-shell {
  max-width: var(--site-width) !important;
}

.legacy-refresh .article-header,
.legacy-refresh .article-body,
.legacy-refresh .legacy-source-root {
  min-width: 0;
}

/* The legacy page CSS targets every header; keep only the site header sticky. */
body .legacy-refresh > .article-header {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  background: transparent !important;
  border: 0 !important;
}

.legacy-source-root,
.legacy-source-root.page-wrap,
.legacy-source-root.wrap,
.legacy-source-root.container {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit;
  background: transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* The OpenMax shell owns these elements after the page is refreshed. */
.legacy-source-root > :is(.breadcrumb, .badges, .author-block, .byline, nav.toc, aside.toc, .table-of-contents, .guide-nav-bar),
.legacy-source-root > :is(.subtitle, .meta-desc),
.legacy-source-root h1 {
  display: none !important;
}

.legacy-source-root > * {
  max-width: 100%;
}

.legacy-source-root > section,
.legacy-source-root > h2 {
  margin-top: 68px;
}

.legacy-source-root > section:first-child,
.legacy-source-root > h2:first-child {
  margin-top: 0;
}

.legacy-source-root > .hero {
  min-height: 0 !important;
  margin: 0 0 54px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.legacy-source-root :is(h2, h3, h4) {
  color: #111827;
  letter-spacing: 0 !important;
  text-wrap: balance;
}

.legacy-source-root h2 {
  margin-bottom: 20px !important;
  font-size: 30px !important;
  line-height: 1.32 !important;
  font-weight: 660 !important;
}

.legacy-source-root h3 {
  margin-bottom: 9px !important;
  font-size: 19px !important;
  line-height: 1.45 !important;
  font-weight: 660 !important;
}

.legacy-source-root h4 {
  margin-bottom: 7px !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  font-weight: 680 !important;
}

.legacy-source-root :is(p, li, td, th, blockquote, figcaption, label) {
  overflow-wrap: anywhere;
  letter-spacing: 0 !important;
}

.legacy-source-root p {
  color: #4b5563;
  line-height: 1.78;
}

.legacy-source-root :is(ul, ol) {
  max-width: 100%;
  padding-left: 1.35em;
}

.legacy-source-root li + li {
  margin-top: 7px;
}

.legacy-source-root a[href] {
  color: #207fb9;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legacy-source-root a[href]:hover {
  color: #111827;
}

.legacy-source-root :is(img, video, canvas, svg, iframe) {
  max-width: 100%;
}

.legacy-source-root img {
  height: auto;
}

.legacy-source-root img.openmax-inline-brand {
  width: auto !important;
  height: 38px !important;
  max-width: 170px !important;
  padding: 0 !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.legacy-source-root .author-avatar:has(> img.openmax-inline-brand),
.legacy-source-root [class*="author-avatar"]:has(img.openmax-inline-brand) {
  width: 170px !important;
  min-width: 170px !important;
  height: 42px !important;
  padding: 2px 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.tldr, section.tldr, .snippet, section.snippet, .feat-snippet, .featured) {
  max-width: 100%;
  padding: 25px 27px !important;
  background: rgba(239, 248, 253, 0.68) !important;
  border: 1px solid rgba(50, 151, 215, 0.16) !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 34px rgba(31, 65, 87, 0.06) !important;
}

.legacy-source-root :is(.tldr, section.tldr, .snippet, section.snippet, .feat-snippet, .featured) + * {
  margin-top: 48px;
}

.legacy-source-root :is(.card, .feature-card, .faq-item, .step-card, .benefit-card, .use-case-card, .stat-card, .metric-card, .author-card, .content-card, .pricing-card, .plan-card, .platform-card, .case-card, .comparison-card, .tool-card) {
  min-width: 0;
  border-color: #e3e8ee !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.card, .feature-card, .faq-item, .step-card, .benefit-card, .use-case-card, .stat-card, .metric-card, .pricing-card, .plan-card, .platform-card, .case-card, .comparison-card, .tool-card):hover {
  border-color: rgba(50, 151, 215, 0.42) !important;
  box-shadow: 0 14px 30px rgba(26, 68, 94, 0.07) !important;
}

.legacy-source-root :is(button, .btn, [class*="button"], [class*="cta"] a) {
  border-radius: 6px !important;
}

.legacy-source-root :is(.grid, [class$="-grid"], [class*="-grid "]) > * {
  min-width: 0;
}

.legacy-source-root table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.legacy-source-root th {
  color: #111827;
  background: #f7f9fb;
}

.legacy-source-root :is(th, td) {
  padding: 14px 15px;
  border-color: #e3e8ee;
}

.legacy-source-root blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  color: #4b5563;
  background: #f8fafc;
  border-left: 3px solid #3297d7;
  border-radius: 0 8px 8px 0;
}

.legacy-source-root pre,
.legacy-source-root code {
  max-width: 100%;
}

.legacy-source-root pre {
  overflow-x: auto;
  border-radius: 8px;
}

.legacy-source-root [data-aos] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.legacy-unlinked-reference {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1000px) {
  .legacy-source-root > section,
  .legacy-source-root > h2 {
    margin-top: 58px;
  }
}

@media (max-width: 760px) {
  .legacy-source-root > section,
  .legacy-source-root > h2 {
    margin-top: 48px;
  }

  .legacy-source-root h2 {
    font-size: 25px !important;
  }

  .legacy-source-root h3 {
    font-size: 18px !important;
  }

  .legacy-source-root :is(.tldr, section.tldr, .snippet, section.snippet, .feat-snippet, .featured) {
    padding: 21px 19px !important;
  }

  .legacy-source-root :is(.metric-grid, .metrics-grid, .feature-grid, .benefit-grid, .card-grid, .use-case-grid, .pricing-grid, .platform-grid, .comparison-grid, .steps-grid, .ba-grid, .faq-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .legacy-source-root table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .legacy-source-root :is(th, td) {
    min-width: 138px;
    padding: 12px;
  }
}

/* Render linked and intentionally unlinked related references consistently. */
body .legacy-source-root .related > :is(a, .legacy-unlinked-reference) {
  display: block !important;
  min-width: 0;
  min-height: 132px;
  padding: 20px !important;
  color: #182230 !important;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  background: #fff !important;
  border: 1px solid #dbe7ef !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 22px rgba(30, 73, 102, 0.05) !important;
}

body .legacy-source-root .related > :is(a, .legacy-unlinked-reference) > span {
  display: block !important;
  margin-top: 8px;
  color: #667085 !important;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.6;
}

body .related-docs-list {
  gap: 12px !important;
}

body .related-docs-list > a {
  min-height: 94px;
  padding: 18px 17px !important;
  background: #fff;
  border: 1px solid #dbe7ef !important;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(30, 73, 102, 0.05);
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 200ms ease,
    box-shadow 200ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  body .legacy-source-root .related > a:hover,
  body .related-docs-list > a:hover {
    border-color: rgba(50, 151, 215, 0.42) !important;
    box-shadow: 0 12px 26px rgba(30, 73, 102, 0.09) !important;
    transform: translateY(-2px);
  }
}

@media (max-width: 900px) {
  body .legacy-source-root .related > :is(a, .legacy-unlinked-reference),
  body .related-docs-list > a {
    min-height: 0;
  }

  body .related-docs-list {
    gap: 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .legacy-source-root .related > a,
  body .related-docs-list > a {
    transition: none !important;
  }
}

/* Keep equivalent card titles visually equal even when legacy markup mixes heading levels. */
body {
  font-family: "OpenMax Inter", "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body .legacy-source-root {
  font-family: "OpenMax Inter", "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body .legacy-source-root :is(
  .tldr-grid,
  .ba-grid,
  .pain-grid,
  .related-grid,
  .legacy-proof-strip
) > * > :is(h2, h3, h4, h5) {
  margin: 0 0 9px !important;
  padding: 0 !important;
  color: #111827 !important;
  font-family: inherit !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  font-weight: 680 !important;
  letter-spacing: 0 !important;
}

body .legacy-source-root :is(
  .tldr-grid,
  .ba-grid,
  .pain-grid,
  .related-grid,
  .legacy-proof-strip
) > * :is(h2, h3, h4, h5) {
  margin: 0 0 9px !important;
  padding: 0 !important;
  color: #111827 !important;
  font-family: inherit !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  font-weight: 680 !important;
  letter-spacing: 0 !important;
}

body .legacy-source-root :is(.btn-primary, .btn-outline) {
  font-family: inherit !important;
}

body .legacy-source-root .tldr-grid > .tldr-item > :is(h2, h3, h4, h5) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 0 !important;
  text-align: center !important;
}

body .legacy-source-root .tldr-grid > .tldr-item > :is(h2, h3, h4, h5) > i[class^="ri-"],
body .legacy-source-root .tldr-grid > .tldr-item > :is(h2, h3, h4, h5) > i[class*=" ri-"] {
  font-family: remixicon !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
}

body .legacy-source-root .tldr-grid > .tldr-item > p {
  margin: 0 !important;
  color: #4b5563 !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}

/* The refreshed shell mirrors the live OpenMax header and footer. */
body .site-header {
  z-index: 50 !important;
  font-family: "OpenMax Inter", "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif !important;
}

body .site-header > .header-inner {
  width: min(100%, 1280px) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
}

body .site-footer {
  margin: 0 !important;
  padding: 64px 32px !important;
  font-family: "OpenMax Inter", "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif !important;
  background: #fff !important;
  border-top: 1px solid #f3f4f6 !important;
}

body .site-footer > .footer-inner {
  width: min(100%, 1280px) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body .site-footer > .footer-inner > .footer-grid {
  display: flex !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 48px !important;
  grid-template-columns: none !important;
  text-align: left !important;
}

body .site-footer .footer-brand {
  max-width: 320px !important;
  margin: 0 !important;
  text-align: left !important;
}

body .site-footer .footer-brand img {
  width: auto !important;
  height: 32px !important;
  margin: 0 !important;
}

body .site-footer .footer-brand p {
  margin: 16px 0 0 !important;
  color: #6b7280 !important;
  font-size: 14px !important;
  line-height: 1.625 !important;
  letter-spacing: -0.7px !important;
  text-align: left !important;
}

body .site-footer .footer-links-grid {
  margin: 0 !important;
  padding: 0 !important;
  align-items: start !important;
  justify-content: stretch !important;
  gap: 48px !important;
  text-align: left !important;
}

body .site-footer .footer-column {
  margin: 0 !important;
  text-align: left !important;
}

body .site-footer .footer-column :is(h2, h3) {
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
  color: #000 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.42px !important;
}

body .site-footer .footer-column ul {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .site-footer .footer-column li {
  margin: 0 !important;
  line-height: 24px !important;
  text-align: left !important;
}

body .site-footer .footer-column li + li {
  margin-top: 10px !important;
}

body .site-footer .footer-column a {
  display: inline !important;
  color: #6b7280 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  letter-spacing: -0.7px !important;
  text-align: left !important;
}

body .site-footer > .footer-inner > .footer-bottom {
  display: flex !important;
  width: 100% !important;
  max-width: none !important;
  margin: 48px 0 0 !important;
  padding: 32px 0 0 !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  grid-template-columns: none !important;
  color: #6b7280 !important;
  border-top: 1px solid #f3f4f6 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  letter-spacing: -0.7px !important;
  text-align: left !important;
}

body .site-footer .footer-bottom > span,
body .site-footer .footer-legal,
body .site-footer .footer-legal a {
  margin: 0 !important;
  padding: 0 !important;
  color: #6b7280 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 20px !important;
  letter-spacing: -0.7px !important;
}

body .site-footer .footer-legal {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 20px !important;
}

body .site-footer .footer-legal a {
  display: block !important;
}

@media (max-width: 767px) {
  body .site-footer {
    padding: 48px 24px !important;
  }

  body .site-footer > .footer-inner > .footer-grid {
    flex-direction: column !important;
    gap: 48px !important;
  }

  body .site-footer .footer-brand img {
    height: 28px !important;
  }

  body .site-footer .footer-brand {
    width: 320px !important;
    max-width: 100% !important;
  }

  body .site-footer .footer-links-grid {
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 32px !important;
  }

  body .site-footer > .footer-inner > .footer-bottom {
    flex-direction: column-reverse !important;
    text-align: center !important;
  }

  body .site-footer .footer-legal {
    justify-content: center !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-refresh *,
  .legacy-refresh *::before,
  .legacy-refresh *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep recurring summary and metric groups visually separate and scannable. */
body .legacy-source-root .tldr-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body .legacy-source-root > section.legacy-summary-panel {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  overflow: visible !important;
}

body .legacy-source-root .tldr-grid > *,
body .legacy-source-root > section.legacy-summary-panel > .box {
  min-width: 0 !important;
  min-height: 150px;
  margin: 0 !important;
  padding: 20px !important;
  background: #fff !important;
  border: 1px solid #dbe7ef !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 22px rgba(30, 73, 102, 0.055) !important;
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 200ms ease,
    box-shadow 200ms ease !important;
}

body .legacy-source-root .tldr-grid > *:first-child,
body .legacy-source-root .tldr-grid > *:last-child,
body .legacy-source-root > section.legacy-summary-panel > .box:first-child,
body .legacy-source-root > section.legacy-summary-panel > .box:last-child {
  border: 1px solid #dbe7ef !important;
}

body .legacy-source-root .tldr-grid > * .label,
body .legacy-source-root > section.legacy-summary-panel > .box .label {
  display: block;
  margin-bottom: 9px;
  color: #207fb9 !important;
  font-weight: 700;
}

body .legacy-source-root > .legacy-metric-strip {
  gap: 12px !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .legacy-source-root > .legacy-metric-strip > * {
  min-height: 112px;
  background: #fff !important;
  border: 1px solid #dbe7ef !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 22px rgba(30, 73, 102, 0.05) !important;
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 200ms ease,
    box-shadow 200ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  body .legacy-source-root > :is(.legacy-summary-panel, .legacy-metric-strip):hover {
    z-index: auto;
    border-color: rgba(50, 151, 215, 0.2) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body .legacy-source-root .tldr-grid > *:hover,
  body .legacy-source-root > section.legacy-summary-panel > .box:hover,
  body .legacy-source-root > .legacy-metric-strip > *:hover {
    border-color: rgba(50, 151, 215, 0.42) !important;
    box-shadow: 0 12px 26px rgba(30, 73, 102, 0.09) !important;
    transform: translateY(-2px) !important;
  }
}

@media (max-width: 760px) {
  body .legacy-source-root .tldr-grid,
  body .legacy-source-root > section.legacy-summary-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body .legacy-source-root .tldr-grid > *,
  body .legacy-source-root > section.legacy-summary-panel > .box {
    min-height: 0;
  }

  body .legacy-source-root > .legacy-metric-strip {
    gap: 10px !important;
  }

  body .legacy-source-root > .legacy-metric-strip > * {
    min-height: 104px;
  }
}

@media (max-width: 520px) {
  body .legacy-source-root > .legacy-metric-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .legacy-source-root .tldr-grid > *,
  body .legacy-source-root > section.legacy-summary-panel > .box,
  body .legacy-source-root > .legacy-metric-strip > * {
    transition: none !important;
  }
}

/* Prevent legacy divider rules from reopening individual card edges. */
body .legacy-source-root > .legacy-metric-strip > *:first-child,
body .legacy-source-root > .legacy-metric-strip > *:last-child,
body .legacy-source-root > .legacy-metric-strip > *:nth-child(even),
body .legacy-source-root > .legacy-metric-strip > *:nth-last-child(-n + 2) {
  border: 1px solid #dbe7ef !important;
}

/* Let related-page copy determine card height instead of hiding long titles. */
body .legacy-source-root .related :is(h3, h4, p) {
  display: block !important;
  overflow: visible !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
}

/* Keep compact labels readable inside narrow legacy grids. */
body .legacy-source-root .ppc-plan {
  flex-wrap: wrap !important;
  column-gap: 7px;
}

body .legacy-source-root .metric-value {
  font-size: 24px !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
}

body .legacy-source-root .arch-card strong {
  font-size: 14px !important;
  overflow-wrap: anywhere;
}

body .legacy-source-root .steps {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Fit wide legacy diagrams on desktop and retain a usable mobile pan size. */
@media (min-width: 761px) {
  body .legacy-source-root .viz:not(:has(.agent-loop-diagram)) > svg,
  body .legacy-source-root .mermaid-box .mermaid,
  body .legacy-source-root .mermaid-box svg {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
  }

  body .legacy-source-root .mermaid-box {
    overflow-x: hidden !important;
  }
}

@media (max-width: 760px) {
  body .legacy-source-root .metric-value {
    font-size: 22px !important;
  }

  body .legacy-source-root .steps {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .legacy-source-root .viz:not(:has(.agent-loop-diagram)) > svg,
  body .legacy-source-root .mermaid-box .mermaid,
  body .legacy-source-root .mermaid-box svg {
    width: 640px !important;
    min-width: 640px !important;
    max-width: none !important;
    height: auto !important;
  }
}

/* Responsive operating loop for the AI agent guide. */
.legacy-source-root .viz:has(.agent-loop-diagram) {
  padding: 27px !important;
  overflow: visible !important;
  background: #f7fafc !important;
}

.legacy-source-root .viz:has(.agent-loop-diagram) > h2 {
  margin: 0 0 22px !important;
}

.legacy-source-root .agent-loop-diagram {
  padding: 20px;
  background: #fff;
  border: 1px solid #dfe7ed;
  border-radius: 8px;
}

.legacy-source-root .agent-loop-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 28px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.legacy-source-root .agent-loop-step {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 104px;
  gap: 12px;
  align-items: flex-start;
  margin: 0 !important;
  padding: 17px 15px !important;
  color: #172033;
  background: #fff;
  border: 1px solid #dfe7ed;
  border-radius: 8px;
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease;
}

.legacy-source-root .agent-loop-index {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  place-items: center;
  color: #197bb9;
  font-size: 12px;
  line-height: 1;
  font-weight: 760;
  background: #edf7fd;
  border: 1px solid #cfe6f4;
  border-radius: 50%;
}

.legacy-source-root .agent-loop-copy {
  display: block;
  min-width: 0;
}

.legacy-source-root .agent-loop-copy strong {
  display: block;
  margin: 1px 0 6px;
  color: #172033;
  font-size: 15px;
  line-height: 1.35;
}

.legacy-source-root .agent-loop-copy > span {
  display: block;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.legacy-source-root .agent-loop-return {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 13px 15px;
  color: #38566b;
  background: #eef7fd;
  border-left: 3px solid #3297d7;
  border-radius: 7px;
}

.legacy-source-root .agent-loop-return-icon {
  display: grid;
  width: 31px;
  min-width: 31px;
  height: 31px;
  place-items: center;
  color: #197bb9;
  font-size: 20px;
  line-height: 1;
  background: #fff;
  border: 1px solid #cfe6f4;
  border-radius: 50%;
}

.legacy-source-root .agent-loop-return p {
  margin: 0 !important;
  color: inherit !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
}

.legacy-source-root .viz:has(.agent-loop-diagram) > .caption {
  max-width: 680px;
  margin: 15px auto 0 !important;
  color: #667085 !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
}

@media (min-width: 761px) {
  .legacy-source-root .agent-loop-step:not(:nth-child(3n))::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 50%;
    right: -21px;
    width: 13px;
    height: 1px;
    background: #a9cfe6;
  }

  .legacy-source-root .agent-loop-step:not(:nth-child(3n))::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: calc(50% - 3px);
    right: -21px;
    width: 6px;
    height: 6px;
    border-top: 1px solid #7db8db;
    border-right: 1px solid #7db8db;
    transform: rotate(45deg);
  }
}

@media (hover: hover) and (pointer: fine) {
  .legacy-source-root .viz:has(.agent-loop-diagram):hover {
    border-color: #e3e8ee !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .legacy-source-root .agent-loop-step:hover {
    z-index: 2;
    background: #fbfdff;
    border-color: rgba(50, 151, 215, 0.48);
    box-shadow: 0 10px 22px rgba(30, 73, 102, 0.1);
    transform: translateY(-2px);
  }
}

@media (max-width: 760px) {
  .legacy-source-root .viz:has(.agent-loop-diagram) {
    padding: 20px 17px !important;
  }

  .legacy-source-root .viz:has(.agent-loop-diagram) > h2 {
    margin-bottom: 17px !important;
  }

  .legacy-source-root .agent-loop-diagram {
    padding: 13px;
  }

  .legacy-source-root .agent-loop-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .legacy-source-root .agent-loop-step {
    min-height: 0;
    padding: 14px !important;
  }

  .legacy-source-root .agent-loop-step:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: -11px;
    left: 30px;
    width: 1px;
    height: 10px;
    background: #a9cfe6;
  }

  .legacy-source-root .agent-loop-return {
    align-items: flex-start;
    padding: 12px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-source-root .agent-loop-step {
    transition: none !important;
  }
}

/* Present the opening workflow as distinct cards, not a divided table. */
body .legacy-source-root .legacy-opening-panel .flow-map {
  gap: 12px !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body .legacy-source-root .legacy-opening-panel .flow-row,
body .legacy-source-root .legacy-opening-panel .flow-row:nth-child(odd),
body .legacy-source-root .legacy-opening-panel .flow-row:nth-last-child(-n + 2) {
  min-height: 112px;
  padding: 17px 16px !important;
  background: #fff !important;
  border: 1px solid #dfe7ed !important;
  border-radius: 8px !important;
  box-shadow: 0 5px 15px rgba(30, 73, 102, 0.045) !important;
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  body .legacy-source-root .legacy-opening-panel:has(.flow-map):hover {
    border-color: rgba(50, 151, 215, 0.2) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body .legacy-source-root .legacy-opening-panel .flow-row:hover {
    z-index: 1;
    background: #fbfdff !important;
    border-color: rgba(50, 151, 215, 0.48) !important;
    box-shadow: 0 10px 23px rgba(30, 73, 102, 0.1) !important;
    transform: translateY(-2px) !important;
  }
}

@media (max-width: 760px) {
  body .legacy-source-root .legacy-opening-panel .flow-map {
    gap: 10px !important;
  }

  body .legacy-source-root .legacy-opening-panel .flow-row,
  body .legacy-source-root .legacy-opening-panel .flow-row:nth-child(odd),
  body .legacy-source-root .legacy-opening-panel .flow-row:nth-last-child(-n + 2),
  body .legacy-source-root .legacy-opening-panel .flow-row:last-child {
    min-height: 0;
    padding: 14px !important;
    border: 1px solid #dfe7ed !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .legacy-source-root .legacy-opening-panel .flow-row {
    transition: none !important;
  }
}

/* Final OpenMax editorial normalization. Legacy pages keep their information,
   while the shared docs shell owns visual hierarchy and color. */
.legacy-source-root > * {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.legacy-source-root :is(.toc, .table-of-contents, .guide-nav-bar),
.legacy-source-root .legacy-opening :is(.badge-row, .hero-actions) {
  display: none !important;
}

.legacy-source-root > .legacy-opening {
  display: block !important;
  width: 100% !important;
  margin: 0 0 48px !important;
}

.legacy-source-root .legacy-opening > div {
  width: 100% !important;
  max-width: none !important;
}

.legacy-source-root .legacy-opening-note {
  margin: 0 0 20px !important;
  padding: 13px 0 13px 18px !important;
  color: #4b5563 !important;
  background: transparent !important;
  border: 0 !important;
  border-left: 3px solid #3297d7 !important;
  border-radius: 0 !important;
}

.legacy-source-root .legacy-opening-panel {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 25px 27px !important;
  color: #3d4857 !important;
  background: #f3f9fd !important;
  border: 1px solid #dbeaf3 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.legacy-source-root .legacy-opening-panel .flow-map {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: 100% !important;
}

.legacy-source-root .legacy-opening-panel .flow-row {
  min-width: 0 !important;
  padding: 17px 18px !important;
  background: rgba(255, 255, 255, 0.7) !important;
  border: 0 !important;
  border-bottom: 1px solid #dbe5ec !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.legacy-source-root .legacy-opening-panel .flow-row:nth-last-child(-n + 2) {
  border-bottom: 0 !important;
}

.legacy-source-root .legacy-opening-panel .flow-row:nth-child(odd) {
  border-right: 1px solid #dbe5ec !important;
}

.legacy-source-root .legacy-opening-panel .flow-icon {
  color: #207fb9 !important;
  background: #e8f5fc !important;
  border-color: rgba(50, 151, 215, 0.2) !important;
}

.legacy-source-root > div.legacy-summary-panel,
.legacy-source-root > section.legacy-summary-panel {
  position: relative;
  display: block !important;
  margin: 0 0 48px !important;
  padding: 25px 27px !important;
  color: #3d4857 !important;
  background: #f3f9fd !important;
  border: 1px solid #dbeaf3 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.legacy-source-root > .legacy-summary-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #3297d7;
  border-radius: 10px 0 0 10px;
}

.legacy-source-root .tldr-heading {
  margin: 0 0 17px !important;
  color: #207fb9 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 720 !important;
  text-align: left !important;
}

.legacy-source-root .tldr-grid,
.legacy-source-root section.legacy-summary-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
}

.legacy-source-root .tldr-grid {
  display: grid !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.96) !important;
  border-radius: 8px !important;
}

.legacy-source-root .tldr-grid > *,
.legacy-source-root section.legacy-summary-panel > .box {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 18px 17px !important;
  color: #4b5563 !important;
  background: transparent !important;
  border: 0 !important;
  border-left: 1px solid #dbe5ec !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
}

.legacy-source-root .tldr-grid > *:first-child,
.legacy-source-root section.legacy-summary-panel > .box:first-child {
  border-left: 0 !important;
}

.legacy-source-root > div.legacy-answer-panel,
.legacy-source-root > section.legacy-answer-panel {
  margin: 42px 0 48px !important;
  padding: 5px 0 5px 23px !important;
  color: #3d4857 !important;
  background: #fff !important;
  border: 0 !important;
  border-left: 3px solid #3297d7 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.legacy-source-root > .legacy-answer-panel h2 {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  font-size: 24px !important;
}

.legacy-source-root > .legacy-metric-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  overflow: hidden;
  margin: 0 0 24px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #e3e8ee !important;
  border-radius: 9px !important;
}

.legacy-source-root > .legacy-metric-strip > * {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 17px 15px !important;
  color: #3d4857 !important;
  background: #fff !important;
  border: 0 !important;
  border-left: 1px solid #e3e8ee !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
}

.legacy-source-root > .legacy-metric-strip > *:first-child {
  border-left: 0 !important;
}

.legacy-source-root > .legacy-metric-strip strong {
  display: block;
  margin-bottom: 5px;
  color: #207fb9 !important;
}

.legacy-source-root > .legacy-proof-strip {
  display: flex !important;
  gap: 10px 22px !important;
  align-items: center !important;
  margin: 0 0 28px !important;
  padding: 11px 0 15px !important;
  color: #6b7280 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #e3e8ee !important;
}

.legacy-source-root > .legacy-context-strip {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 0 30px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.legacy-source-root > .legacy-context-strip .status-pill {
  padding: 7px 10px !important;
  color: #466176 !important;
  background: #f3f9fd !important;
  border: 1px solid #dbeaf3 !important;
  border-radius: 6px !important;
}

.legacy-source-root :is(.methodology, section.methodology, .methodology-section, .page-notes, .about-section, .data-source, .trust-note, .note-box, .highlight-box) {
  color: #4b5563 !important;
  background: #f8fafc !important;
  border: 1px solid #e3e8ee !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.viz, .chart-wrap, .chat-demo) {
  color: #3d4857 !important;
  background: #f8fafc !important;
  border-color: #e3e8ee !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.ba-grid, .ba-section, .pain-grid) > * {
  color: #3d4857 !important;
  background: #fff !important;
  border-color: #e3e8ee !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.legacy-source-root .pain-fix {
  color: #466176 !important;
  background: #f3f9fd !important;
  border-color: #dbeaf3 !important;
}

.legacy-source-root :is(.dim-card, .draft-card, .qc-quality-note) {
  color: #3d4857 !important;
  background: #f8fafc !important;
  border-color: #e3e8ee !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.card, .feature-card, .faq-item, .step-card, .benefit-card, .use-case-card, .stat-card, .metric-card, .author-card, .content-card, .pricing-card, .plan-card, .platform-card, .case-card, .comparison-card, .tool-card) {
  color: #3d4857 !important;
  background: #fff !important;
}

.legacy-source-root :is(.comp-table-wrap, .comparison-table-wrap, .table-wrapper) {
  overflow-x: auto;
  background: #fff !important;
  border: 1px solid #e3e8ee !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

.legacy-source-root table thead,
.legacy-source-root table thead th {
  color: #111827 !important;
  background: #f7f9fb !important;
}

.legacy-source-root :is(section.cta, .cta-box, .cta-section) {
  color: #111827 !important;
  background: #f0f8fd !important;
  border: 1px solid #d6e7f2 !important;
  border-right: 4px solid #3297d7 !important;
  border-radius: 9px !important;
  box-shadow: 0 18px 46px rgba(30, 73, 102, 0.08) !important;
}

.legacy-source-root :is(section.cta, .cta-box, .cta-section) :is(h2, h3, p, li, strong, span) {
  color: inherit !important;
}

.legacy-source-root :is(.btn.primary, .cta .btn, .cta-box .btn, .cta-section .btn) {
  color: #fff !important;
  background: #3297d7 !important;
  border: 1px solid #3297d7 !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.psc-link, .cta-button, .btn-primary) {
  color: #fff !important;
  background: #3297d7 !important;
  border-color: #3297d7 !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.btn.secondary, .cta .btn.secondary, .cta-box .btn.secondary, .cta-section .btn.secondary) {
  color: #203040 !important;
  background: #fff !important;
  border-color: #cad9e3 !important;
}

.legacy-source-root .badge {
  color: #207fb9 !important;
  background: #f3f9fd !important;
  border-color: rgba(50, 151, 215, 0.25) !important;
}

.legacy-source-root .plan-flow {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.legacy-source-root .plan-flow-arrow {
  display: none !important;
}

.legacy-source-root .plan-flow-node {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 20px 13px !important;
  color: #3d4857 !important;
  background: #fff !important;
  border: 1px solid #dbe5ec !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.legacy-source-root .plan-flow-node.pro {
  background: #f3f9fd !important;
  border-color: #8dccf0 !important;
}

.legacy-source-root .plan-flow-node :is(.plan-flow-name, .plan-flow-details, span) {
  color: inherit !important;
}

.legacy-source-root :is(.plan-pick-card, .pricing-snapshot-card) {
  color: #3d4857 !important;
  background: #fff !important;
  background-image: none !important;
  border: 1px solid #dbe5ec !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.legacy-source-root :is(.plan-pick-card.pro, .pricing-snapshot-card.is-featured) {
  background: #f3f9fd !important;
  border-color: #8dccf0 !important;
}

.legacy-source-root :is(.plan-pick-card, .pricing-snapshot-card) :is(h3, p, li, span, div) {
  color: inherit !important;
}

@media (max-width: 760px) {
  .legacy-source-root > .legacy-opening,
  .legacy-source-root > div.legacy-summary-panel,
  .legacy-source-root > section.legacy-summary-panel,
  .legacy-source-root > div.legacy-answer-panel,
  .legacy-source-root > section.legacy-answer-panel {
    margin-bottom: 38px !important;
  }

  .legacy-source-root > div.legacy-summary-panel,
  .legacy-source-root > section.legacy-summary-panel,
  .legacy-source-root .legacy-opening-panel {
    padding: 21px 19px !important;
  }

  .legacy-source-root .legacy-opening-panel .flow-map,
  .legacy-source-root .tldr-grid,
  .legacy-source-root section.legacy-summary-panel {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .legacy-source-root .legacy-opening-panel .flow-row,
  .legacy-source-root .tldr-grid > *,
  .legacy-source-root section.legacy-summary-panel > .box {
    border-right: 0 !important;
    border-bottom: 1px solid #dbe5ec !important;
    border-left: 0 !important;
  }

  .legacy-source-root .legacy-opening-panel .flow-row:last-child,
  .legacy-source-root .tldr-grid > *:last-child,
  .legacy-source-root section.legacy-summary-panel > .box:last-child {
    border-bottom: 0 !important;
  }

  .legacy-source-root > .legacy-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .legacy-source-root > .legacy-metric-strip > * {
    border-bottom: 1px solid #e3e8ee !important;
    border-left: 0 !important;
  }

  .legacy-source-root > .legacy-metric-strip > *:nth-child(even) {
    border-left: 1px solid #e3e8ee !important;
  }

  .legacy-source-root > .legacy-metric-strip > *:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }

  .legacy-source-root > .legacy-proof-strip {
    align-items: flex-start !important;
  }

  .legacy-source-root .plan-flow {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Compact editorial tables and restrained card lift. */
.legacy-source-root table {
  box-sizing: border-box;
  width: min(100%, 760px) !important;
  margin: 18px auto 26px !important;
  overflow: hidden;
  font-size: 14px !important;
  line-height: 1.5 !important;
  background: #fff !important;
  border: 1px solid #e1e7ed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 7px 20px rgba(30, 73, 102, 0.045) !important;
}

.legacy-source-root table :is(th, td) {
  min-width: 0;
  padding: 10px 12px !important;
  font-size: inherit !important;
  line-height: 1.5 !important;
  vertical-align: top !important;
  border-width: 0 1px 1px 0 !important;
  border-style: solid !important;
  border-color: #e6ebf0 !important;
}

.legacy-source-root table th {
  color: #172033 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  background: #f5f9fc !important;
}

.legacy-source-root table :is(th, td):last-child {
  border-right-width: 0 !important;
}

.legacy-source-root table tbody tr:last-child td,
.legacy-source-root table thead:last-child tr:last-child th {
  border-bottom-width: 0 !important;
}

.legacy-source-root table tbody tr {
  transition: background-color 180ms ease;
}

.legacy-source-root table tbody tr:nth-child(even) {
  background: rgba(247, 250, 252, 0.72);
}

.legacy-source-root table caption {
  padding: 0 0 10px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.legacy-source-root :is(
  .legacy-opening-panel,
  .card,
  .feature-card,
  .faq-item,
  .step-card,
  .benefit-card,
  .use-case-card,
  .stat-card,
  .metric-card,
  .author-card,
  .content-card,
  .pricing-card,
  .plan-card,
  .platform-card,
  .case-card,
  .comparison-card,
  .tool-card,
  .plan-flow-node,
  .plan-pick-card,
  .pricing-snapshot-card,
  .dim-card,
  .draft-card,
  .qc-quality-note,
  .methodology,
  .methodology-section,
  .page-notes,
  .about-section,
  .data-source,
  .trust-note,
  .note-box,
  .highlight-box,
  .viz,
  .chart-wrap,
  .chat-demo
):not(.reveal),
.legacy-source-root > :is(.legacy-summary-panel, .legacy-metric-strip):not(.reveal),
.legacy-source-root :is(.ba-grid, .ba-section, .pain-grid) > :not(.reveal) {
  transition:
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  .legacy-source-root table tbody tr:hover {
    background: #f0f8fd !important;
  }

  .legacy-source-root :is(
    .legacy-opening-panel,
    .card,
    .feature-card,
    .faq-item,
    .step-card,
    .benefit-card,
    .use-case-card,
    .stat-card,
    .metric-card,
    .author-card,
    .content-card,
    .pricing-card,
    .plan-card,
    .platform-card,
    .case-card,
    .comparison-card,
    .tool-card,
    .plan-flow-node,
    .plan-pick-card,
    .pricing-snapshot-card,
    .dim-card,
    .draft-card,
    .qc-quality-note,
    .methodology,
    .methodology-section,
    .page-notes,
    .about-section,
    .data-source,
    .trust-note,
    .note-box,
    .highlight-box,
    .viz,
    .chart-wrap,
    .chat-demo
  ):is(:not(.reveal), .reveal.is-visible):hover,
  .legacy-source-root > :is(.legacy-summary-panel, .legacy-metric-strip):is(:not(.reveal), .reveal.is-visible):hover,
  .legacy-source-root :is(.ba-grid, .ba-section, .pain-grid) > :is(:not(.reveal), .reveal.is-visible):hover {
    z-index: 1;
    border-color: rgba(50, 151, 215, 0.45) !important;
    box-shadow: 0 13px 28px rgba(30, 73, 102, 0.1) !important;
    transform: translateY(-3px) !important;
  }
}

@media (max-width: 760px) {
  .legacy-source-root table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 14px 0 22px !important;
    overflow-x: auto;
    border-radius: 7px !important;
    -webkit-overflow-scrolling: touch;
  }

  .legacy-source-root table :is(th, td) {
    min-width: 124px;
    padding: 9px 10px !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-source-root table tbody tr,
  .legacy-source-root :is(
    .legacy-opening-panel,
    .card,
    .feature-card,
    .faq-item,
    .step-card,
    .benefit-card,
    .use-case-card,
    .stat-card,
    .metric-card,
    .author-card,
    .content-card,
    .pricing-card,
    .plan-card,
    .platform-card,
    .case-card,
    .comparison-card,
    .tool-card,
    .plan-flow-node,
    .plan-pick-card,
    .pricing-snapshot-card,
    .dim-card,
    .draft-card,
    .qc-quality-note,
    .methodology,
    .methodology-section,
    .page-notes,
    .about-section,
    .data-source,
    .trust-note,
    .note-box,
    .highlight-box,
    .viz,
    .chart-wrap,
    .chat-demo
  ),
  .legacy-source-root > :is(.legacy-summary-panel, .legacy-metric-strip),
  .legacy-source-root :is(.ba-grid, .ba-section, .pain-grid) > * {
    transition: none !important;
  }
}
.legacy-source-root .qc-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
  margin-top: 18px;
  align-items: stretch;
}

.legacy-source-root .qc-checklist-grid > article {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
}

@media (max-width: 720px) {
  .legacy-source-root .qc-checklist-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.legacy-source-root .related-grid.related-grid-balanced {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}

.legacy-source-root .related-grid.related-grid-balanced > .related {
  grid-column: span 2;
}

.legacy-source-root .related-grid.related-grid-balanced > .related:nth-child(4):nth-last-child(2) {
  grid-column: 2 / span 2;
}

.legacy-source-root .related-grid.related-grid-balanced > .related:nth-child(5):last-child {
  grid-column: 4 / span 2;
}

.legacy-source-root :is(.related-grid-flat, .related-grid-balanced) > .related,
.legacy-source-root :is(.related-grid-flat, .related-grid-balanced) > .related:hover {
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.legacy-source-root :is(.related-grid-flat, .related-grid-balanced) > .related > :is(a, .legacy-unlinked-reference) {
  box-sizing: border-box;
  height: 100%;
}

.legacy-source-root .related-grid.related-grid-flat:not(.related-grid-balanced) > .related:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .legacy-source-root .related-grid.related-grid-balanced {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .legacy-source-root .related-grid.related-grid-balanced > .related:nth-child(4):nth-last-child(2) {
    grid-column: span 2;
  }

  .legacy-source-root .related-grid.related-grid-balanced > .related:nth-child(5):last-child {
    grid-column: 2 / span 2;
  }
}

@media (max-width: 640px) {
  .legacy-source-root .related-grid.related-grid-balanced {
    grid-template-columns: minmax(0, 1fr);
  }

  .legacy-source-root .related-grid.related-grid-balanced > .related,
  .legacy-source-root .related-grid.related-grid-balanced > .related:nth-child(4):nth-last-child(2),
  .legacy-source-root .related-grid.related-grid-balanced > .related:nth-child(5):last-child {
    grid-column: auto;
  }
}

/* Keep exact four-item editorial groups visually balanced at every desktop width. */
body .legacy-source-root .cards:has(> .content-card:nth-child(4):last-child),
body .legacy-source-root .steps:has(> .step-card:nth-child(4):last-child),
body .legacy-source-root .related:has(> :nth-child(4):last-child) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

body .legacy-source-root .cards:has(> .content-card:nth-child(4):last-child) > .content-card,
body .legacy-source-root .steps:has(> .step-card:nth-child(4):last-child) > .step-card,
body .legacy-source-root .related:has(> :nth-child(4):last-child) > * {
  min-height: 0 !important;
  height: 100%;
}

@media (max-width: 720px) {
  body .legacy-source-root .cards:has(> .content-card:nth-child(4):last-child),
  body .legacy-source-root .steps:has(> .step-card:nth-child(4):last-child),
  body .legacy-source-root .related:has(> :nth-child(4):last-child) {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto;
  }
}

body .legacy-source-root > .legacy-proof-strip:has(> :nth-child(4):last-child) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: 1fr;
  align-items: stretch !important;
  gap: 16px !important;
}

body .legacy-source-root > .legacy-proof-strip:has(> :nth-child(4):last-child) > * {
  min-width: 0 !important;
  height: 100%;
}

@media (max-width: 900px) {
  body .legacy-source-root > .legacy-proof-strip:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  body .legacy-source-root table.matrix {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

body .legacy-source-root details.faq-item > summary {
  position: relative;
  padding-right: 58px !important;
}

body .legacy-source-root details.faq-item > summary::before {
  content: none !important;
  display: none !important;
}

body .legacy-source-root details.faq-item > summary::after {
  content: "+" !important;
  position: absolute !important;
  top: 50% !important;
  right: 14px !important;
  display: grid !important;
  place-items: center;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  color: #207fb9 !important;
  background: #edf7fd !important;
  font-family: Arial, sans-serif !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  transform: translateY(-50%) !important;
}

body .legacy-source-root details.faq-item[open] > summary::after {
  content: "\2212" !important;
  color: #176f9f !important;
  background: #e4f3fb !important;
  transform: translateY(-50%) !important;
}

/* 2026-07-27 visual consistency pass: align legacy modules with the live OpenMax docs shell. */
.legacy-source-root {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Microsoft YaHei", system-ui, -apple-system, sans-serif !important;
}

.legacy-source-root :is(
  .agent-loop-copy > span,
  .agent-loop-return p,
  .viz .caption,
  .viz-caption,
  .step-desc,
  .metric-card p,
  .stat-card p,
  .pricing-card li,
  .plan-card li,
  .platform-card p,
  .comparison-card p,
  .tool-card p,
  .related a,
  .related .legacy-unlinked-reference
) {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.legacy-source-root :is(.btn.primary, .cta .btn, .cta-box .btn, .cta-section .btn, .psc-link, .cta-button, .btn-primary) {
  color: #fff !important;
  background: #176f9f !important;
  border-color: #176f9f !important;
}

.legacy-source-root :is(.btn.primary, .cta .btn, .cta-box .btn, .cta-section .btn, .psc-link, .cta-button, .btn-primary):hover {
  color: #fff !important;
  background: #115b84 !important;
  border-color: #115b84 !important;
}

/* Exact four-item groups should always read as a balanced 2-by-2 composition. */
body .legacy-source-root :is(.steps, .pain-grid, .cards, .related, .related-grid):has(> :nth-child(4):last-child) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 1fr !important;
  gap: 16px !important;
  align-items: stretch !important;
}

body .legacy-source-root :is(.steps, .pain-grid, .cards, .related, .related-grid):has(> :nth-child(4):last-child) > * {
  min-width: 0 !important;
  width: auto !important;
  height: 100% !important;
}

/* Seven-item editorial groups use a deliberate 4 + 3 layout instead of an orphan card. */
body .legacy-source-root :is(.related, .related-grid):has(> :nth-child(7):last-child) {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

body .legacy-source-root :is(.related, .related-grid):has(> :nth-child(7):last-child) > * {
  grid-column: span 2 !important;
  min-width: 0 !important;
  width: auto !important;
  height: 100% !important;
}

body .legacy-source-root :is(.related, .related-grid):has(> :nth-child(7):last-child) > :nth-child(5) {
  grid-column: 2 / span 2 !important;
}

body .legacy-source-root :is(.related, .related-grid):has(> :nth-child(7):last-child) > :nth-child(6) {
  grid-column: 4 / span 2 !important;
}

body .legacy-source-root :is(.related, .related-grid):has(> :nth-child(7):last-child) > :nth-child(7) {
  grid-column: 6 / span 2 !important;
}

.legacy-source-root table.matrix {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 760px) {
  body .legacy-source-root :is(.steps, .pain-grid, .cards, .related, .related-grid):has(> :nth-child(4):last-child),
  body .legacy-source-root :is(.related, .related-grid):has(> :nth-child(7):last-child) {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
  }

  body .legacy-source-root :is(.steps, .pain-grid, .cards, .related, .related-grid):has(> :nth-child(4):last-child) > *,
  body .legacy-source-root :is(.related, .related-grid):has(> :nth-child(7):last-child) > * {
    grid-column: auto !important;
    height: auto !important;
  }

  .legacy-source-root :is(.viz, .chart-wrap, .diagram, .mermaid, .table-wrap, .comp-table-wrap, .comparison-table-wrap, .table-wrapper) {
    position: relative;
    max-width: 100% !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .legacy-source-root :is(.viz, .chart-wrap, .diagram, .mermaid) :is(svg, canvas) {
    max-width: none;
  }
}

/* 2026-07-27 final layout and readability pass */
.legacy-source-root :is(
  .cta-button,
  .cta-btn,
  .btn-primary,
  .btn.primary,
  .psc-link,
  .cta-band a
) {
  color: #fff !important;
  background: #176f9f !important;
  border-color: #176f9f !important;
}

.legacy-source-root :is(
  .cta-button,
  .cta-btn,
  .btn-primary,
  .btn.primary,
  .psc-link,
  .cta-band a
):hover {
  color: #fff !important;
  background: #115b84 !important;
  border-color: #115b84 !important;
}

.legacy-source-root a:not([class]),
.legacy-source-root :is(.source-line, .legacy-opening-note) a {
  color: #176f9f;
}

.legacy-source-root :is(
  .caption,
  .source-line,
  .legacy-opening-note,
  .nocode,
  .psc-fit,
  .t-author,
  .section-label
) {
  font-size: 13px !important;
  line-height: 1.65 !important;
}

.legacy-source-root :is(.about-grid, .ba-grid):has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
}

.legacy-source-root div[style*="repeat(auto-fit,minmax(235px,1fr))"]:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
}

@media (min-width: 1101px) {
  .legacy-source-root .pain-grid:has(> :nth-child(11):last-child) {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }

  .legacy-source-root .pain-grid:has(> :nth-child(11):last-child) > * {
    grid-column: span 2;
  }

  .legacy-source-root .pain-grid:has(> :nth-child(11):last-child) > :nth-child(9) {
    grid-column: 2 / span 2;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .legacy-source-root .pain-grid:has(> :nth-child(11):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .legacy-source-root .pain-grid:has(> :nth-child(11):last-child) > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  html[lang^="en"] .article-main h1,
  html[lang^="ja"] .article-main h1 {
    font-size: 30px !important;
    line-height: 1.18 !important;
  }

  .legacy-source-root :is(.about-grid, .ba-grid, .pain-grid),
  .legacy-source-root div[style*="repeat(auto-fit,minmax(235px,1fr))"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 2026-07-27 final cascade correction */
body,
.legacy-source-root {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Microsoft YaHei", system-ui, sans-serif !important;
}

.legacy-source-root a[href]:not(.dashboard-link) {
  color: #176f9f !important;
}

.legacy-source-root :is(.btn-outline, .cta-btn-outline, .related-card) {
  color: #176f9f !important;
  border-color: #9fc9df !important;
}

.legacy-source-root :is(.pain-card, article) > p,
.legacy-source-root div[style*="grid"] > article p {
  font-size: 14px !important;
  line-height: 1.65 !important;
}

.legacy-source-root :is(
  .caption,
  .source-line,
  .legacy-opening-note,
  .nocode,
  .psc-fit,
  .t-author,
  .section-label
) {
  font-size: 14px !important;
}

@media (max-width: 760px) {
  html[lang^="en"] .article-main h1,
  html[lang^="ja"] .article-main h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }
}

/* 2026-07-27 button and long-title correction */
body :is(.breadcrumb, .breadcrumbs, .article-breadcrumb) a {
  color: #176f9f !important;
}

html body .article-body .legacy-source-root a:is(
  .btn,
  .btn-primary,
  .cta,
  .cta-button,
  .cta-btn,
  .psc-link
),
html body .article-body .legacy-source-root :is(
  .cta-band,
  .cta-box,
  .cta-section
) a {
  color: #fff !important;
  background: #176f9f !important;
  border-color: #176f9f !important;
}

html body .article-body .legacy-source-root a:is(
  .btn,
  .btn-primary,
  .cta,
  .cta-button,
  .cta-btn,
  .psc-link
):hover,
html body .article-body .legacy-source-root :is(
  .cta-band,
  .cta-box,
  .cta-section
) a:hover {
  color: #fff !important;
  background: #115b84 !important;
  border-color: #115b84 !important;
}

@media (max-width: 760px) {
  html[lang^="en"] .article-main h1 {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }
}

/* 2026-07-27 high-specificity CTA correction */
html body .article-body .legacy-source-root :is(
  .cta.reveal,
  .cta-box,
  .cta-section,
  .cta-band
) a:is(
  .btn.primary,
  .btn,
  .btn-primary,
  .cta,
  .cta-button,
  .cta-btn,
  .psc-link
) {
  color: #fff !important;
  background: #176f9f !important;
  border-color: #176f9f !important;
}

html body .article-body .legacy-source-root :is(
  .cta.reveal,
  .cta-box,
  .cta-section,
  .cta-band
) a:is(
  .btn.primary,
  .btn,
  .btn-primary,
  .cta,
  .cta-button,
  .cta-btn,
  .psc-link
):hover {
  color: #fff !important;
  background: #115b84 !important;
  border-color: #115b84 !important;
}

/* 2026-07-27 navigation contrast and small-copy correction */
body .docs-sidebar a[aria-current="page"],
body .article-toc a,
body .toc a {
  color: #176f9f !important;
}

html body .article-body .legacy-source-root :is(
  .cta.reveal,
  .cta-box,
  .cta-section,
  .cta-band
) > a {
  color: #fff !important;
  background: #176f9f !important;
  border-color: #176f9f !important;
}

.legacy-source-root :is(
  .evaluation-note,
  .flow-node,
  .verdict-text,
  .cost-card,
  .switch-card,
  .faq-item
) p,
.legacy-source-root .psc-list li {
  font-size: 14px !important;
  line-height: 1.65 !important;
}

/* 2026-07-27 auxiliary copy readability correction */
.legacy-source-root :is(
  .methodology,
  .methodology-item,
  .methodology-block,
  .mermaid-section,
  .step-card,
  .viz
) p,
.legacy-source-root.container > .reveal p,
.legacy-source-root > p,
.legacy-source-root .related-grid > p {
  font-size: 14px !important;
  line-height: 1.65 !important;
}

/* 2026-07-27 inline helper readability correction */
.legacy-source-root div[style*="border-left"] > p,
.legacy-source-root p.caption,
.legacy-source-root .cta-box > p[style*="font-size:13px"] {
  font-size: 14px !important;
  line-height: 1.65 !important;
}

/* 2026-07-27 caption specificity correction */
html body .legacy-source-root .viz > p.caption {
  font-size: 14px !important;
  line-height: 1.65 !important;
}

/* 2026-07-27 diagram caption correction */
html body .legacy-source-root .viz:has(.agent-loop-diagram) > p.caption {
  font-size: 14px !important;
}

/* 2026-07-29 Agentic AI summary: keep the heading above three readable cards. */
html body .legacy-source-root > section.tldr.legacy-summary-panel {
  display: block !important;
  padding: 28px !important;
}

html body .legacy-source-root > section.tldr.legacy-summary-panel > h2 {
  width: 100% !important;
  margin: 0 0 20px !important;
  color: #111827 !important;
  font-size: 30px !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html body .legacy-source-root > section.tldr.legacy-summary-panel > .grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  min-width: 0 !important;
}

html body .legacy-source-root > section.tldr.legacy-summary-panel > .grid-3 > .item {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 20px !important;
  background: #fff !important;
  border: 1px solid #dbe7ef !important;
  border-radius: 8px !important;
}

html body .legacy-source-root > section.tldr.legacy-summary-panel > .grid-3 > .item p {
  overflow-wrap: normal !important;
  word-break: normal !important;
  white-space: normal !important;
}

@media (max-width: 860px) {
  html body .legacy-source-root > section.tldr.legacy-summary-panel {
    padding: 21px 19px !important;
  }

  html body .legacy-source-root > section.tldr.legacy-summary-panel > h2 {
    margin-bottom: 16px !important;
    font-size: 25px !important;
  }

  html body .legacy-source-root > section.tldr.legacy-summary-panel > .grid-3 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
}
