/* The workflow graph must always show its complete six-stage composition. */
.ceo-workbench-preview:has(img[src*="ai-workflow-banner"]) {
  min-height: 0;
  aspect-ratio: auto;
}

.ceo-workbench-preview img[src*="ai-workflow-banner"] {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

/* Shared mobile reading rhythm for the public marketing and content pages. */
@media (max-width: 720px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    line-height: 1.65;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .h1,
  .h2,
  .h3 {
    letter-spacing: -0.018em !important;
    overflow-wrap: break-word;
    text-wrap: balance;
    word-break: normal;
  }

  h1,
  .h1 {
    font-size: clamp(1.75rem, 7.3vw, 2rem) !important;
    line-height: 1.35 !important;
  }

  h2,
  .h2 {
    font-size: clamp(1.45rem, 5.9vw, 1.65rem) !important;
    line-height: 1.42 !important;
  }

  h3,
  .h3 {
    font-size: clamp(1.15rem, 4.8vw, 1.3rem) !important;
    line-height: 1.5 !important;
  }

  p,
  li,
  blockquote,
  figcaption {
    line-height: 1.75;
    overflow-wrap: break-word;
    text-wrap: pretty;
  }

  .lead,
  .body-text,
  .swm-section-head p,
  .swm-product-copy > p,
  .swm-slide p,
  .swm-final__panel p {
    font-size: 1rem !important;
    line-height: 1.75 !important;
  }

  .page-cover h1,
  .page-cover h2,
  .swm-section-head h2,
  .swm-product-copy h2,
  .swm-final__panel h2,
  .swm-slide h1,
  .swm-slide h2,
  .section-head h2,
  .closing-band h2,
  .signup-head h2 {
    text-wrap: balance;
  }

  .page-cover h1 br,
  .swm-section-head h2 br,
  .swm-product-copy h2 br,
  .swm-final__panel h2 br,
  .swm-slide h1 br,
  .swm-slide h2 br,
  .section-head h2 br,
  .closing-band h2 br,
  .signup-head h2 br {
    display: none;
  }

  .swm-section-head h2,
  .swm-product-copy h2,
  .swm-final__panel h2 {
    font-size: clamp(1.55rem, 6.2vw, 1.75rem) !important;
  }

  .swm-section-head {
    margin-bottom: 1.75rem;
  }

  .swm-section-head__index {
    margin-bottom: 0.65rem;
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .swm-section-head p {
    margin-top: 0.9rem;
  }

  .swm-section {
    padding: 3.5rem 0;
  }

  .swm-product-module {
    padding: 2.75rem 0;
  }

  .swm-pain-card,
  .swm-advantage,
  .swm-service-card {
    min-height: 0;
  }

  .swm-pain-card,
  .swm-advantage {
    padding: 1.5rem;
  }

  .swm-pain-card h3 {
    margin-top: 1rem;
  }

  .swm-pain-card p,
  .swm-service-card p,
  .swm-advantage li {
    font-size: 0.9375rem;
  }

  .swm-pain-card__flow {
    margin-top: 1.1rem;
    padding-top: 0.85rem;
    line-height: 1.7;
  }

  .swm-advantages {
    gap: 0.875rem;
  }

  .swm-advantage {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 0.875rem;
    row-gap: 0;
    align-items: start;
    padding: 1.15rem 1.25rem;
  }

  .swm-advantage__icon {
    grid-row: 1 / span 3;
    grid-column: 1;
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
    line-height: 1;
  }

  .swm-advantage strong {
    grid-column: 2;
    margin-top: 0;
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
  }

  .swm-advantage h3 {
    grid-column: 2;
    margin-top: 0.25rem;
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  .swm-advantage ul {
    grid-column: 2;
    margin-top: 0.55rem;
    gap: 0.15rem;
    font-size: 0.875rem;
    line-height: 1.6;
  }

  .swm-service-card {
    padding: 1.5rem;
  }

  .swm-service-card h3 {
    margin-top: 1rem;
  }

  .swm-service-card p {
    margin-top: 0.8rem;
    line-height: 1.7;
  }

  .swm-final {
    padding: 3rem 0 3.5rem;
  }

  .swm-final__panel {
    width: min(100% - 1.5rem, 950px);
    padding: 2.35rem 1.25rem;
    border-radius: 1.25rem;
  }

  .swm-final__panel p {
    margin-top: 0.9rem;
  }

  .swm-final__actions {
    margin-top: 1.25rem;
    gap: 0.75rem;
  }

  .swm-final__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    padding: 2.5rem 0 1.75rem;
  }

  .footer-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1.25rem;
    padding-bottom: 1.75rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col {
    min-width: 0;
  }

  .footer-brand p {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    line-height: 1.65;
  }

  .footer-col h2,
  .footer-col h4 {
    margin: 0 0 0.65rem;
    line-height: 1.4;
  }

  .footer-col li {
    margin-bottom: 0.3rem;
  }

  .footer-col a {
    display: inline-block;
    padding-block: 0.2rem;
    line-height: 1.55;
  }

  /* The Chengdu course hero intentionally uses a nowrap line on desktop. */
  .hero-value {
    white-space: normal !important;
  }

  .hero h1 .accent,
  .hero h1 .title-brand,
  .hero h1 .title-line {
    max-width: 100%;
    width: auto;
  }

  body[data-workbench-id] .workbench-hero {
    padding: 3rem 0 2.5rem;
    gap: 2rem;
  }

  body[data-workbench-id] .workbench-hero h1 {
    font-size: clamp(1.75rem, 7.5vw, 2.15rem) !important;
    line-height: 1.35 !important;
  }

  body[data-workbench-id] .hero-summary,
  body[data-workbench-id] .entry-subtitle,
  body[data-workbench-id] .entry-meta p,
  body[data-workbench-id] .knowledge-document {
    line-height: 1.7;
    text-wrap: pretty;
  }

  body[data-workbench-id] .workbench-section {
    padding-top: 3rem;
  }

  body[data-workbench-id] .section-heading {
    gap: 0.75rem;
    align-items: start;
    padding-bottom: 1rem;
  }

  body[data-workbench-id] .section-heading h2 {
    font-size: clamp(1.4rem, 6vw, 1.7rem) !important;
    line-height: 1.4 !important;
  }

  body[data-workbench-id] .entry h3 {
    font-size: 1.15rem !important;
    line-height: 1.5 !important;
  }

  body[data-workbench-id] .entry {
    padding: 1.25rem 0.85rem;
  }

  body[data-workbench-id] .entry-title-row {
    gap: 0.4rem;
  }

  .site-header.is-open::after {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 1;
    background: rgba(2, 3, 20, 0.58);
    backdrop-filter: blur(2px);
    content: "";
    pointer-events: none;
  }

  html.shunwei-theme .site-header.is-open .nav {
    right: 0;
    left: auto;
    z-index: 2;
    width: min(82vw, 20rem);
    max-width: calc(100dvw - 3.5rem);
    margin: 0;
    padding: 0.5rem 1rem 1.25rem;
    border-right: 0;
    border-bottom: 1px solid rgba(147, 153, 230, 0.28);
    border-left: 1px solid rgba(147, 153, 230, 0.28);
    border-radius: 0 0 0 1rem;
    background: rgba(7, 7, 31, 0.985);
    box-shadow:
      -18px 24px 52px rgba(0, 0, 0, 0.42),
      inset 1px 0 rgba(255, 255, 255, 0.04);
  }

  html.shunwei-theme .site-header.is-open .nav a,
  html.shunwei-theme .site-header.is-open .nav-product-trigger {
    min-inline-size: 0;
    padding-block: 0.75rem;
    line-height: 1.45;
    overflow-wrap: break-word;
  }

  html.shunwei-theme .site-header.is-open .nav-submenu {
    padding-left: 0.75rem;
  }

}

@media (max-width: 360px) {
  h1,
  .h1,
  body[data-workbench-id] .workbench-hero h1 {
    font-size: 1.7rem !important;
  }

  h2,
  .h2,
  .swm-section-head h2,
  .swm-product-copy h2,
  .swm-final__panel h2,
  body[data-workbench-id] .section-heading h2 {
    font-size: 1.3rem !important;
    line-height: 1.48 !important;
  }

  h3,
  .h3,
  body[data-workbench-id] .entry h3 {
    font-size: 1.1rem !important;
  }

  .footer-top {
    column-gap: 0.75rem;
  }
}
