/* Evolrix readable editorial layer, 2026-11-20.
 *
 * Benchmarks the public site against Benchling's calm, single-family reading
 * system while retaining Evolrix's facility photography, evidence ledger and
 * mission-control palette:
 *   display + body: Geist
 *   data only:      Geist Mono
 *   H1 60 / H2 40 / H3 24 / UI 14 / body 17
 *
 * The site is a static publication with layered legacy CSS. This file is loaded
 * last so each page inherits one typographic and spatial rhythm.
 */

html[data-evolrix-family] {
  --ev-ui-sans: "Geist", "Noto SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --ev-ui-display: "Geist", "Noto SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --ev-ui-mono: "Geist Mono", "Noto SC", "PingFang SC", ui-monospace,
    SFMono-Regular, Menlo, monospace;
  --ev-reading-width: 68ch;
  --ev-page-width: 1200px;
  --ev-editorial-gap: clamp(32px, 5vw, 80px);

  /* Keep legacy layers on the same family and type roles. */
  --font-body: var(--ev-ui-sans) !important;
  --font-head: var(--ev-ui-display) !important;
  --font-mono: var(--ev-ui-mono) !important;
  --ev-body: var(--ev-ui-sans) !important;
  --ev-display: var(--ev-ui-display) !important;
  --ev-mono: var(--ev-ui-mono) !important;
}

html[data-evolrix-family] body {
  font-family: var(--ev-ui-sans) !important;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html[data-evolrix-family] body :is(button, input, textarea, select) {
  font-family: var(--ev-ui-sans) !important;
}

/* Navigation: Benchling uses sentence case and a quiet 14–16px UI voice.
 * The extra selectors clear the legacy mission-layer uppercase lock. */
html[data-evolrix-family] body
  .navbar.navbar.navbar
  .menu
  a:not(#ev-readable-a):not(#ev-readable-b):not(#ev-readable-c):not(#ev-readable-d):not(#ev-readable-e) {
  color: rgba(240, 240, 250, 0.62) !important;
  font-family: var(--ev-ui-sans) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html[data-evolrix-family] body
  .navbar.navbar.navbar
  .menu
  a:is(:hover, :focus-visible, [aria-current="page"], .active):not(#ev-readable-a):not(#ev-readable-b):not(#ev-readable-c):not(#ev-readable-d):not(#ev-readable-e) {
  color: #f0f0fa !important;
}

html[data-evolrix-family] body
  .navbar
  :is(.dx-nav-cta, .ov-navcta) {
  font-family: var(--ev-ui-sans) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html[data-evolrix-family] body .navbar .seg :is(a, button) {
  font-family: var(--ev-ui-sans) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Small editorial labels are labels, not terminal output. Mono remains reserved
 * for record fields, dates, IDs, metrics and table data. */
html[data-evolrix-family] body
  :is(
    .eyebrow,
    .pn-kicker,
    .plabel,
    .section-kicker,
    .section-label,
    .pb-kicker,
    .vision-hero-kicker,
    .home-editorial-kicker
  ) {
  color: rgba(174, 181, 198, 0.88) !important;
  font-family: var(--ev-ui-sans) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: 0.045em !important;
  text-transform: none !important;
}

/* One display family, one display rhythm. The hero uses Benchling's mixed-case,
 * 500-weight heading rather than an all-caps poster treatment. */
html[data-evolrix-family] body main h1,
html[data-evolrix-family] body #v2 h1,
html[data-evolrix-family] body .navbar + a + main h1,
html[data-evolrix-family] body h1#vision-title,
html[data-evolrix-family] body h1.ph-title {
  max-width: 900px !important;
  margin-top: 0 !important;
  color: #f0f0fa !important;
  font-family: var(--ev-ui-display) !important;
  font-size: clamp(44px, 4.17vw, 60px) !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
  text-transform: none !important;
  text-wrap: balance;
}

html[data-evolrix-family] body #v2 h2,
html[data-evolrix-family] body main h2,
html[data-evolrix-family] body .pn-section h2,
html[data-evolrix-family] body .detail-editorial h2 {
  max-width: 800px !important;
  color: #f0f0fa !important;
  font-family: var(--ev-ui-display) !important;
  font-size: clamp(32px, 2.78vw, 40px) !important;
  font-weight: 500 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
  text-transform: none !important;
  text-wrap: balance;
}

html[data-evolrix-family] body #v2 h3,
html[data-evolrix-family] body main h3,
html[data-evolrix-family] body .pn-section h3 {
  font-family: var(--ev-ui-display) !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  text-wrap: balance;
}

html[data-evolrix-family][lang="zh-CN"] body main h1,
html[data-evolrix-family][lang="zh-CN"] body #v2 h1,
html[data-evolrix-family][lang="zh-CN"] body h1#vision-title,
html[data-evolrix-family][lang="zh-CN"] body h1.ph-title {
  font-size: clamp(40px, 3.9vw, 56px) !important;
  line-height: 1.14 !important;
  letter-spacing: -0.015em !important;
}

html[data-evolrix-family][lang="zh-CN"] body #v2 h2,
html[data-evolrix-family][lang="zh-CN"] body main h2,
html[data-evolrix-family][lang="zh-CN"] body .pn-section h2,
html[data-evolrix-family][lang="zh-CN"] body .detail-editorial h2 {
  font-size: clamp(32px, 2.75vw, 40px) !important;
  line-height: 1.24 !important;
  letter-spacing: 0 !important;
}

/* Primary reading copy. Long technical claims stay at a measure that is
 * comfortable on a 1440px desktop and does not collapse into full-width lines. */
html[data-evolrix-family] body
  :is(
    .lead,
    .ph-intro,
    .pn-head-copy,
    .pn-copy,
    .detail-editorial__copy,
    .detail-editorial__intro > p,
    .pricing-hero-lead,
    .prose-body p
  ) {
  max-width: var(--ev-reading-width) !important;
  color: rgba(240, 240, 250, 0.78) !important;
  font-family: var(--ev-ui-sans) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 1.56 !important;
  letter-spacing: -0.005em !important;
  text-wrap: pretty;
}

html[data-evolrix-family] body
  :is(
    .vision-hero-lead,
    .pilot-hero-copy > p:not(.pn-kicker),
    .research-hero .lead
  ) {
  max-width: 660px !important;
  color: rgba(224, 228, 237, 0.84) !important;
  font-family: var(--ev-ui-sans) !important;
  font-size: clamp(18px, 1.4vw, 20px) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: -0.005em !important;
  text-wrap: pretty;
}

html[data-evolrix-family][lang="zh-CN"] body
  :is(
    .lead,
    .ph-intro,
    .pn-head-copy,
    .pn-copy,
    .detail-editorial__copy,
    .detail-editorial__intro > p,
    .pricing-hero-lead,
    .vision-hero-lead,
    .pilot-hero-copy > p:not(.pn-kicker),
    .prose-body p
  ) {
  line-height: 1.82 !important;
  letter-spacing: 0 !important;
}

/* CTA typography follows the reading family. The angular border and dark
 * material stay; only the all-caps terminal voice is removed. */
html[data-evolrix-family] body .pn-button,
html[data-evolrix-family] body .pn-text-link,
html[data-evolrix-family] body
  #v2#v2#v2#v2#v2#v2#v2#v2
  :is(.cta, .button-primary, .dx-btn, .btn, .btn-primary),
html[data-evolrix-family] body
  :is(
    .vision-hero-btn-primary,
    .pn-hero-secondary,
    .home-final-action,
    .home-inline-link
  ) {
  font-family: var(--ev-ui-sans) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html[data-evolrix-family] body .pn-button,
html[data-evolrix-family] body
  #v2#v2#v2#v2#v2#v2#v2#v2
  :is(.cta, .button-primary, .dx-btn, .btn, .btn-primary) {
  min-height: 44px !important;
  height: auto !important;
  padding-inline: 20px !important;
}

/* The Research hero CTA inherits the legacy terminal button from the mission
 * layer. Keep it on the same sentence-case 14px action rhythm and anchor it to
 * the hero's left reading edge. */
html[data-evolrix-family] body .research-hero .hd > .cta {
  display: inline-flex !important;
  min-height: 44px !important;
  height: auto !important;
  margin: 28px 0 0 !important;
  padding: 0 20px !important;
  align-self: flex-start !important;
  justify-self: start !important;
  font-family: var(--ev-ui-sans) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
}

/* Evidence labels remain instrumental, but they no longer set the tone for the
 * whole page. */
html[data-evolrix-family] body
  :is(
    .home-cinema-record-head,
    .home-cinema-record-row span,
    .home-cinema-record-link,
    .pilot-record dt,
    .pricing-boundary dt,
    .pricing-ledger-index,
    .pn-record-metrics dt,
    .pn-boundary-ledger dt,
    .detail-editorial__record dt,
    .detail-editorial__row > span
  ) {
  font-family: var(--ev-ui-mono) !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

/* 12-column editorial logic: wide claim on the left, narrow explanatory copy on
 * the right. This is the main spatial cue borrowed from Benchling. */
html[data-evolrix-family] body .pn-head {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr) !important;
  gap: var(--ev-editorial-gap) !important;
  align-items: end !important;
}

html[data-evolrix-family] body .detail-editorial__intro {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr) !important;
  gap: var(--ev-editorial-gap) !important;
  align-items: end !important;
}

html[data-evolrix-family] body .pn-section {
  padding-block: clamp(88px, 8vw, 120px) !important;
}

html[data-evolrix-family] body .pn-kicker {
  margin-bottom: 22px !important;
}

html[data-evolrix-family] body
  :is(.pn-ledger-row, .home-outcome-lines article) {
  gap: clamp(20px, 3vw, 48px) !important;
}

html[data-evolrix-family] body .home-cinema-hero,
html[data-evolrix-family] body .pilot-hero {
  background-color: #05080a;
}

html[data-evolrix-family] body
  :is(.pn-shell, .detail-editorial__shell, .pilot-hero-inner, .pricing-hero-inner) {
  max-width: var(--ev-page-width);
}

@media (max-width: 900px) {
  html[data-evolrix-family] body .pn-head,
  html[data-evolrix-family] body .detail-editorial__intro {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

@media (max-width: 640px) {
  html[data-evolrix-family] body main h1,
  html[data-evolrix-family] body #v2 h1,
  html[data-evolrix-family] body h1#vision-title,
  html[data-evolrix-family] body h1.ph-title {
    font-size: clamp(34px, 9.6vw, 38px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
  }

  html[data-evolrix-family][lang="zh-CN"] body main h1,
  html[data-evolrix-family][lang="zh-CN"] body #v2 h1,
  html[data-evolrix-family][lang="zh-CN"] body h1#vision-title,
  html[data-evolrix-family][lang="zh-CN"] body h1.ph-title {
    font-size: 44px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
  }

  html[data-evolrix-family] body #v2 h2,
  html[data-evolrix-family] body main h2,
  html[data-evolrix-family] body .pn-section h2,
  html[data-evolrix-family] body .detail-editorial h2 {
    font-size: clamp(30px, 8.2vw, 36px) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.025em !important;
  }

  html[data-evolrix-family][lang="zh-CN"] body #v2 h2,
  html[data-evolrix-family][lang="zh-CN"] body main h2,
  html[data-evolrix-family][lang="zh-CN"] body .pn-section h2,
  html[data-evolrix-family][lang="zh-CN"] body .detail-editorial h2 {
    font-size: clamp(30px, 8.2vw, 36px) !important;
    line-height: 1.3 !important;
  }

  html[data-evolrix-family] body
    :is(
      .lead,
      .ph-intro,
      .pn-head-copy,
      .pn-copy,
      .detail-editorial__copy,
      .detail-editorial__intro > p,
      .pricing-hero-lead,
      .prose-body p,
      .vision-hero-lead,
      .pilot-hero-copy > p:not(.pn-kicker),
      .research-hero .lead
    ) {
    font-size: 16px !important;
    line-height: 1.72 !important;
  }

  html[data-evolrix-family][lang="zh-CN"] body
    :is(
      .lead,
      .ph-intro,
      .pn-head-copy,
      .pn-copy,
      .detail-editorial__copy,
      .detail-editorial__intro > p,
      .pricing-hero-lead,
      .prose-body p,
      .vision-hero-lead,
      .pilot-hero-copy > p:not(.pn-kicker),
      .research-hero .lead
    ) {
    line-height: 1.88 !important;
  }

  html[data-evolrix-family] body .pn-section {
    padding-block: 68px !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  html[data-evolrix-family] body *,
  html[data-evolrix-family] body *::before,
  html[data-evolrix-family] body *::after {
    scroll-behavior: auto !important;
  }
}

/* The legacy homepage declares its section spacing inside the nested layout
 * layer, so this mobile override must participate in the same cascade. */
@layer layout.layout.layout.layout {
  @media (max-width: 640px) {
    html[data-evolrix-family] body.vision-page main#main > .pn-section {
      padding-block: 44px !important;
    }
  }
}
