/* Shared editorial split for product and company pages.
   Wide text blocks across the page, with only a small gutter between them. */
:root {
  --editorial-split-shell: 1440px;
  --editorial-split-gap: clamp(20px, 2vw, 32px);
  --editorial-split-columns: repeat(2, minmax(0, 1fr));
  --editorial-copy-offset: clamp(38px, 3.2vw, 52px);
}

/* Ruty */
body.ruty-gemini-page .product-explainer__inner {
  width: min(var(--editorial-split-shell), calc(100% - 48px)) !important;
}

body.ruty-gemini-page .product-explainer__intro,
body.ruty-gemini-page .ruty-components-head {
  grid-template-columns: var(--editorial-split-columns) !important;
  gap: var(--editorial-split-gap) !important;
  align-items: start !important;
}

body.ruty-gemini-page .product-explainer__intro h2,
body.ruty-gemini-page .ruty-components-head :is(h2, .cnw-display) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left !important;
}

body.ruty-gemini-page .product-explainer__copy,
body.ruty-gemini-page .ruty-components-head > .cnw-body {
  width: 100% !important;
  max-width: 700px !important;
  margin: 0 !important;
  padding-top: var(--editorial-copy-offset) !important;
  justify-self: start !important;
  text-align: left !important;
}

/* Terminal / Altdata */
body.terminal-product-page :is(
  .terminal-marquee-heading,
  .pillars-intro,
  .stack-top,
  .use-cases-intro
) {
  width: min(var(--editorial-split-shell), calc(100% - 48px)) !important;
  max-width: var(--editorial-split-shell) !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: var(--editorial-split-columns) !important;
  gap: var(--editorial-split-gap) !important;
  align-items: start !important;
}

/* Match the reference's vertical centre: the heading sits higher and the
   visual begins sooner, while the horizontal grid remains unchanged. */
body.terminal-product-page .terminal-marquee-heading {
  margin-block: 0 !important;
  padding: 102px 0 54px !important;
}

body.terminal-product-page :is(
  .terminal-marquee-heading,
  .pillars-intro,
  .stack-top,
  .use-cases-intro
) :is(h2, .section-title) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left !important;
}

/* Match the lighter, evenly balanced typography of the supplied reference. */
html body.terminal-product-page.terminal-product-page main .terminal-marquee-heading h2 {
  width: 100% !important;
  max-width: none !important;
  font-size: clamp(44px, 3vw, 50px) !important;
  font-weight: 400 !important;
  line-height: 1.16 !important;
  letter-spacing: -.035em !important;
}

html body.terminal-product-page.terminal-product-page main .terminal-marquee-heading > p {
  width: 100% !important;
  max-width: 700px !important;
  font-size: clamp(19px, 1.25vw, 21px) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: -.015em !important;
}

/* Terminal integration matrix: same light editorial type and technical
   detailing used elsewhere on the product page. */
body.terminal-product-page .stack-section {
  background: #050607 !important;
  color: #f4f4f1 !important;
}

body.terminal-product-page .stack-top :is(.section-title, .kicker) {
  color: #f4f4f1 !important;
}

html body.terminal-product-page.terminal-product-page main .stack-section .stack-top > .body-lg {
  color: rgba(244, 244, 241, .68) !important;
}

html body.terminal-product-page.terminal-product-page main .stack-top .section-title {
  width: 100% !important;
  max-width: none !important;
  font-size: clamp(44px, 3vw, 50px) !important;
  font-weight: 400 !important;
  line-height: 1.16 !important;
  letter-spacing: -.035em !important;
}

html body.terminal-product-page.terminal-product-page main .stack-top > .body-lg {
  width: 100% !important;
  max-width: 700px !important;
  font-size: clamp(19px, 1.25vw, 21px) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: -.015em !important;
}

body.terminal-product-page .logo-grid {
  counter-reset: terminal-surface;
  gap: 10px !important;
  margin-top: clamp(68px, 5.5vw, 84px) !important;
  border: 0 !important;
  background: transparent !important;
}

body.terminal-product-page .logo-cell {
  counter-increment: terminal-surface;
  position: relative !important;
  overflow: hidden !important;
  min-height: 108px !important;
  padding: 22px 24px !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  border: 1px solid rgba(229, 241, 249, .18) !important;
  border-radius: 12px !important;
  background: #0b0d0f !important;
  box-shadow: none !important;
}

body.terminal-product-page .logo-cell::before {
  content: counter(terminal-surface, decimal-leading-zero);
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 24px;
  color: rgba(229, 241, 249, .46);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .08em;
}

body.terminal-product-page .logo-cell-label {
  font-size: 16px !important;
  font-weight: 450 !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

body.terminal-product-page .logo-cell.is-lit {
  background: #142d45 !important;
  border-color: rgba(120, 183, 244, .82) !important;
  box-shadow: inset 0 0 0 1px rgba(120, 183, 244, .28), 0 12px 32px rgba(3, 19, 34, .2) !important;
}

body.terminal-product-page .logo-cell.is-lit::before {
  color: #b9dafa;
}

body.terminal-product-page :is(
  .terminal-marquee-heading > p,
  .pillars-intro > .body-lg,
  .stack-top > .body-lg,
  .use-cases-intro > .body-lg
) {
  width: 100% !important;
  max-width: 700px !important;
  margin: 0 !important;
  padding-top: var(--editorial-copy-offset) !important;
  justify-self: start !important;
  text-align: left !important;
}

/* Enterprise text-to-text sections */
body.enterprise-page :is(.company-split, .enterprise-datasets-head, .company-section-head-row) {
  display: grid !important;
  grid-template-columns: var(--editorial-split-columns) !important;
  gap: var(--editorial-split-gap) !important;
  align-items: start !important;
}

body.enterprise-page :is(.company-split, .enterprise-datasets-head, .company-section-head-row) :is(h2, h3) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left !important;
}

body.enterprise-page .company-split > div,
body.enterprise-page .enterprise-datasets-head > p,
body.enterprise-page .company-section-head-row > p {
  width: 100% !important;
  max-width: 700px !important;
  margin-left: 0 !important;
  padding-top: var(--editorial-copy-offset) !important;
  justify-self: start !important;
  text-align: left !important;
}

body.enterprise-page .company-split > div > p:first-child,
body.enterprise-page .enterprise-datasets-head > p {
  padding-top: 0 !important;
}

@media (max-width: 900px) {
  body.ruty-gemini-page .product-explainer__intro,
  body.ruty-gemini-page .ruty-components-head,
  body.terminal-product-page :is(.terminal-marquee-heading, .pillars-intro, .stack-top, .use-cases-intro),
  body.enterprise-page :is(.company-split, .enterprise-datasets-head, .company-section-head-row) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 26px !important;
  }

  body.ruty-gemini-page :is(.product-explainer__copy, .ruty-components-head > .cnw-body),
  body.terminal-product-page :is(.terminal-marquee-heading > p, .pillars-intro > .body-lg, .stack-top > .body-lg, .use-cases-intro > .body-lg),
  body.enterprise-page :is(.company-split > div, .enterprise-datasets-head > p, .company-section-head-row > p) {
    max-width: 680px !important;
    padding-top: 0 !important;
  }

  body.terminal-product-page .logo-cell {
    min-height: 100px !important;
  }
}

@media (max-width: 560px) {
  body.ruty-gemini-page .product-explainer__inner {
    width: calc(100% - 32px) !important;
  }

}
