/* Product and company interiors. The two showcase pages have their own layout. */
body:not(.showcase-page) > main {
  --bg: #100e23;
  --panel: #221c3e;
  --white: #f8f6ff;
  --muted: #d5d1e5;
  --mint: #89b7ff;
  --pale: #ece5ff;
  --line: #b0a5de4d;
  --label-accent: #c5b8ff;
  --overview-heading-font: Georgia, "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --overview-title: var(--white);
  --overview-body: var(--muted);
  --overview-accent: var(--mint);
  --overview-line: var(--line);
  --overview-panel: var(--panel);
  background: var(--bg);
  color: var(--white);
}

:where(body:not(.showcase-page)) #main .wrap {
  width: min(1280px, calc(100% - clamp(40px, 10vw, 144px)));
}

:where(body:not(.showcase-page)) #main :is(.page-hero, .guide-hero, .example-hero) {
  position: relative;
  isolation: isolate;
  padding-block: clamp(26px, 3vw, 48px) clamp(48px, 6.8vw, 104px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 102% 4%, #9d46d155, transparent 43%),
    radial-gradient(ellipse at 82% 68%, #392c71, #21193d 38%, #100e23 77%);
}

:where(body:not(.showcase-page)) #main .page-hero::before {
  inset: 0;
  pointer-events: none;
  background: linear-gradient(114deg, transparent 58%, #b6a8fe18 72%, transparent 85%);
}

/* Non-product pages use the existing Tongyuye landscape behind their titles. */
:where(body:not(.showcase-page)) #main .page-hero:not(.detail-hero)::before {
  background:
    linear-gradient(90deg, #17102f 2%, #17102fec 34%, #321f55c4 62%, #47386f62),
    linear-gradient(0deg, #100e23, transparent 72%),
    url('public-scenic-3.webp') center 56% / cover;
}

:where(body:not(.showcase-page)) #main :is(.breadcrumb, .breadcrumbs, .guide-breadcrumb) {
  margin-bottom: clamp(35px, 4.6vw, 72px);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: #c8c2de;
  font-size: .79rem;
  line-height: 1.55;
  flex-wrap: wrap;
}

:where(body:not(.showcase-page)) #main .breadcrumb .text-link {
  min-height: 32px;
  font-size: inherit;
}

:where(body:not(.showcase-page)) #main :is(.page-hero, .guide-hero, .example-hero) h1,
:where(body:not(.showcase-page)) #main.product-editorial .page-hero h1 {
  max-width: 23ch;
  margin-bottom: clamp(18px, 2.1vw, 32px);
  color: var(--white);
  font: 400 clamp(2.45rem, 4.4vw, 4.7rem) / 1.13 var(--overview-heading-font);
  letter-spacing: -.04em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

:where(body:not(.showcase-page)) #main :is(.page-hero p, .guide-summary, .example-hero p) {
  max-width: 68ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.14rem);
  line-height: 1.83;
}

:where(body:not(.showcase-page)) #main .detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 88px);
}

:where(body:not(.showcase-page)) #main :is(.section-kicker, .eyebrow, .project-name, .portfolio-step-number) {
  color: var(--label-accent);
  font-size: .79rem;
  font-weight: 550;
  letter-spacing: .08em;
}

:where(body:not(.showcase-page)) #main :is(.section-kicker, .eyebrow)::before,
:where(body:not(.showcase-page)) #main .mint-rule {
  background-color: #f944bb;
}

:where(body:not(.showcase-page)) #main .tag {
  color: #c4bed9;
}

:where(body:not(.showcase-page)) #main .btn {
  min-height: 44px;
  color: #fff;
  background: #6540dd;
  border: 1px solid #6540dd;
  border-radius: 3px;
  padding: .68rem 1.15rem;
  font-weight: 550;
}

:where(body:not(.showcase-page)) #main .btn:is(:hover, :focus-visible) {
  color: #21163a;
  background: #ded4ff;
  border-color: #ded4ff;
}

:where(body:not(.showcase-page)) #main .text-link {
  color: var(--mint);
}

:where(body:not(.showcase-page)) #main :is(.access-panel, .availability, .portfolio-price-box) {
  position: relative;
  min-width: 0;
  padding: clamp(22px, 3vw, 44px);
  background: linear-gradient(125deg, #31234f, #1b1730 69%);
  border: 1px solid var(--line);
  border-top: 2px solid #a998fb;
}

:where(body:not(.showcase-page)) #main :is(.access-panel, .availability, .portfolio-price-box) h2,
:where(body:not(.showcase-page)) #main .portfolio-price-box h3 {
  font-family: var(--overview-heading-font);
  font-weight: 400;
  color: var(--white);
}

:where(body:not(.showcase-page)) #main :is(.project-screenshot, .catalog-image) {
  padding: clamp(9px, 1vw, 16px);
  border: 1px solid #a898e17a;
  background: linear-gradient(130deg, #332755, #171429 72%);
}

:where(body:not(.showcase-page)) #main .project-screenshot .screenshot-link {
  border: 1px solid #a899de66;
  border-radius: 0;
  background: #100e23;
}

:where(body:not(.showcase-page)) #main :is(.project-screenshot, .catalog-image) figcaption {
  color: #c9c2dd;
  font-size: .8rem;
}

:where(body:not(.showcase-page)) #main :is(.screenshot-fullsize, .company-phone a, .install-support a) {
  color: var(--mint);
}

:where(body:not(.showcase-page)) #main .section {
  padding-block: clamp(48px, 6vw, 92px);
}

:where(body:not(.showcase-page)) #main :is(.service-summary, .portfolio-faq-item, .portfolio-service-steps li, .install-platform, .feature, .related-entry, .service-entry, .process-step) {
  border-color: var(--line);
}

:where(body:not(.showcase-page)) #main :is(.section-head, .detail-features, .about-editorial, .faq-layout, .contact-grid, .guide-article, .example-article) h2,
:where(body:not(.showcase-page)) #main .wrap > h2 {
  color: var(--white);
  font-family: var(--overview-heading-font);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}

:where(body:not(.showcase-page)) #main :is(.feature, .portfolio-faq-item, .service-summary, .portfolio-service-steps) h3 {
  color: var(--white);
}

:where(body:not(.showcase-page)) #main :is(.section-head p, .portfolio-faq-item p, .service-summary p, .portfolio-measure, .portfolio-use-layout p, .portfolio-price-box p, .portfolio-service-steps p, .portfolio-use-list, .install-platform ol, .install-note, .topics) {
  color: var(--muted);
}

:where(body:not(.showcase-page)) #main :is(.portfolio-price-table, .public-price-table) {
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

:where(body:not(.showcase-page)) #main :is(.portfolio-price-table, .public-price-table) :is(th, td) {
  border-color: var(--line);
}

:where(body:not(.showcase-page)) #main :is(.portfolio-price-table, .public-price-table) :is(caption, thead th) {
  color: var(--mint);
}

:where(body:not(.showcase-page)) #main .portfolio-price-table td {
  color: var(--white);
}

/* An uninterrupted lilac spread holds the editorial product overview. */
:where(body:not(.showcase-page)) #main section:has(> .wrap > .product-overview) {
  --overview-title: #22193a;
  --overview-body: #443954;
  --overview-accent: #5834bf;
  --overview-line: #9a89bd73;
  padding-block: clamp(42px, 5.4vw, 88px);
  background: #f1edff;
}

:where(body:not(.showcase-page)) #main .product-overview-heading {
  column-gap: clamp(26px, 5vw, 80px);
  margin-block-end: clamp(24px, 3.2vw, 48px);
}

:where(body:not(.showcase-page)) #main .product-overview-heading h2 {
  border: 0;
  padding: 0;
  font: 400 clamp(1.75rem, 3.1vw, 3.1rem) / 1.18 var(--overview-heading-font);
  letter-spacing: -.025em;
}

:where(body:not(.showcase-page)) #main .product-overview-grid {
  gap: clamp(12px, 2.6vw, 38px);
}

:where(body:not(.showcase-page)) #main .product-overview-card {
  padding: clamp(16px, 2vw, 27px) 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--overview-line);
  border-radius: 0;
}

:where(body:not(.showcase-page)) #main .product-overview-example {
  --overview-accent: #48276b;
  --overview-body: #32283e;
  padding: clamp(16px, 1.8vw, 26px);
  border: 0;
  border-radius: 0;
  border-left: 2px solid #6540dd;
  background: #e2dbf8;
}

:where(body:not(.showcase-page)) #main .email-address {
  font-family: var(--overview-heading-font);
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  overflow-wrap: anywhere;
  line-height: 1.4;
}

:where(body:not(.showcase-page)) #main .interest-options a {
  border-color: var(--line);
  border-radius: 3px;
  color: var(--mint);
}

:where(body:not(.showcase-page)) #main :is(.install-support, .diagram) {
  border-color: var(--line);
  background-color: var(--panel);
}

:where(body:not(.showcase-page)) #main .cta-section {
  background: var(--panel);
}

:where(body:not(.showcase-page)) #main .cta-section::before {
  background: linear-gradient(92deg, #150f2ffa, #30234bbf), url('public-scenic-3.webp') center 56% / cover;
}

/* Legacy guide panels used fixed colors alongside the shared variables. */
:where(body:not(.showcase-page)) #main .example-article pre {
  color: #dae5ff;
  background: #161128;
  border-color: #65528d;
}

:where(body:not(.showcase-page)) #main .interest-options a:is(:hover, [aria-current]) {
  color: #efeaff;
  background: #413064;
  border-color: #b89eff;
}

:where(body:not(.showcase-page)) #main :is(a, button, summary):focus-visible {
  outline-color: #89b7ff;
}

:where(body:not(.showcase-page)) #main ::selection {
  color: #fff;
  background: #5831c3;
}

:where(body:not(.showcase-page)) #main .install-support {
  border-inline-start-color: #a98bff;
}

:where(body:not(.showcase-page)) #main .diagram {
  background: radial-gradient(ellipse at 50% 80%, #392b5977, transparent 74%), var(--panel);
}

@media (max-width: 840px) {
  :where(body:not(.showcase-page)) #main .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 620px) {
  :where(body:not(.showcase-page)) #main :is(.page-hero, .guide-hero, .example-hero) h1,
  :where(body:not(.showcase-page)) #main.product-editorial .page-hero h1 {
    font-size: clamp(2rem, 8.5vw, 3rem);
    line-height: 1.18;
  }

  :where(body:not(.showcase-page)) #main .page-hero:not(.detail-hero)::before {
    background:
      linear-gradient(95deg, #130e2deb, #241b47cf),
      url('public-scenic-3.webp') 65% center / cover;
  }

  :where(body:not(.showcase-page)) #main .product-overview-grid {
    gap: 0;
  }

  :where(body:not(.showcase-page)) #main .portfolio-table-scroll th:first-child {
    min-width: 6.5rem;
  }

  :where(body:not(.showcase-page)) #main :is(.portfolio-price-box, .public-price-table) {
    overflow-wrap: anywhere;
  }
}
