/*
 * DBC / BIOTEN V7.31.9 final upgrade layer.
 * Scope: verified accessibility, contrast and keyboard-reachability defects.
 * This layer deliberately leaves approved information architecture, copy,
 * card identity and page-family visual systems unchanged.
 */

/* About: retain the restrained visual hierarchy while meeting text contrast. */
html body.dbc-about-page .dbc-about-continuity span {
  color: #d2deed;
}

html body.dbc-about-page .dbc-about-network__grid span,
html body.dbc-about-page .dbc-about-network__foot p,
html body.dbc-about-page .dbc-about-evidence__items article > span {
  color: #5d6f72 !important;
}

html body.dbc-about-page .dbc-about-network__grid a:is(:hover, :focus-visible) span {
  color: #e0ebf5;
}

/* BIOTEN application family: technical signal labels stay quiet but readable. */
body.bioten-family-v7160.v520-app .v520-signal span {
  color: #596f73;
}

/* Developer: restore the dark context rail intended for the dark laboratory UI. */
html body.dev740-page .v500-context {
  color: #d8ebe8;
  background: rgba(3, 19, 29, .97);
  border-color: rgba(127, 215, 205, .18);
}

html body.dev740-page .v500-context :is(ol, a, .v500-context__next) {
  color: #d8ebe8;
}

html body.dev740-page .v500-context [aria-current="page"] {
  color: #b9d2ce !important;
}

html body.dev740-page .dev740-start__actions .dev740-start__primary small {
  color: #124a3c;
}

html body.dev740-page .dev740-footer__bottom :is(span, a) {
  color: #9eb2b6;
}

/* Shared relationship paths and compact local navigation. */
html body.v281-site:not(.home-v281) .v281-path__copy small {
  color: #576b74;
}

html body .bioten-page-nav a {
  color: #536a75 !important;
}

html[data-v7319-release] body.contact-suite-page {
  --v280-muted: #536a75;
}

html[data-v7319-release] body.contact-suite-page main#main-content nav.bioten-page-nav a {
  color: #536a75 !important;
}

/* Bioten Plus editorial release: metadata and section rail contrast. */
body[data-v7318-packaging-page="packaging-insight-bioten-plus-balanced-paper-packaging"] .bp7140-context a,
body[data-v7318-packaging-page="packaging-insight-bioten-plus-balanced-paper-packaging"] .bp7140-passport dt {
  color: #53665f !important;
}

html[data-v7319-release] body[data-v7318-packaging-page="packaging-insight-bioten-plus-balanced-paper-packaging"] {
  --bp7150-muted: #53665f;
  --bp7160-muted: #53665f;
}

html[data-v7319-release] body[data-v7318-packaging-page="packaging-insight-bioten-plus-balanced-paper-packaging"] nav.bp7140-toc a {
  color: #53665f !important;
}

/* Patent evidence: keep the terminal aesthetic without hiding the vector label. */
body .pgeo-patent-card__vector > span {
  color: #a8bbc8;
}

/* Developer V2.x: harmonise late theme overrides with the light engineering UI. */
html[data-v7319-release] body.dv22-page {
  --dv22-muted: #4b6070;
  --dv2-muted: #4b6070;
}

html[data-v7319-release] body.dv42-page {
  --dv42-muted: #52626c;
  --v770-family-accent: #0c6f54;
}

html[data-v7319-release] body.dv22-page .dv2-action--accent,
html[data-v7319-release] body.dv22-page .dv2-action--accent:hover,
html[data-v7319-release] body.dv22-page footer.formal-site-footer:not(#dv22-dark-footer) .formal-footer-cta a.formal-button--primary {
  color: #f7fafb !important;
  -webkit-text-fill-color: #f7fafb !important;
}

html[data-v7319-release] body.dv2-page .dv2-final__inner > p {
  color: #3e5663 !important;
  -webkit-text-fill-color: #3e5663 !important;
}

/* V5.2 application and specialist pages: quiet labels must remain readable. */
html[data-v7319-release] body.v520-site {
  --v520-muted: #505d66;
}

html[data-v7319-release] body.v520-site.v530-site main
  :is(#gallery, #output).v520-section:not(.v520-section--dark)
  .v520-section-head > p {
  color: #58666d !important;
  -webkit-text-fill-color: #58666d !important;
}

html[data-v7319-release] body.v520-site .v520-signal span {
  color: #58666d;
}

html[data-v7319-release] body.v520-dev .v520-dev-flow p {
  color: #536169;
}

html[data-v7319-release] body.v520-dev--agriculture .v520-dev-flow span {
  color: #5d701f;
}

html[data-v7319-release] body.v520-dev--care .v520-dev-flow span {
  color: #356c74;
}

html[data-v7319-release] body.v520-dev--waterborne .v520-dev-flow span,
html[data-v7319-release] body.v520-dev--coatings .v520-dev-flow span {
  color: #815432;
}

/* Corporate brand pages: one accessible supporting-copy token. */
html[data-v7319-release] body.brand510-site {
  --brand510-muted: #4d5a56;
}

html[data-v7319-release] body.v500-page--dbc .v500-fact > span {
  color: #596871;
}

html[data-v7319-release] body.v500-page--dbc .v500-section--dark .v500-chain article > span {
  color: #9eb5c0;
}

/* Packaging publishing family and R30 capability labels. */
html[data-v7319-release] body.bp7160-packaging-polish {
  --bp7150-muted: #53665f;
  --bp7160-muted: #53665f;
}

html[data-v7319-release] body[data-v7318-packaging-professional="r30"] {
  --bp-r30-cyan: #087569;
}

/* Keep the project-brief anchor below the fixed global and packaging navigation. */
html[data-v7319-release] body.sample-request-page #paper-sample-title {
  scroll-margin-top: 150px;
}

/* Project intake: keep the original form content and improve field layout only. */
html[data-v7319-release] body.sample-request-page .bioten-request-form .request-grid {
  align-items: start;
}

html[data-v7319-release] body.sample-request-page .bioten-request-form .request-grid > label {
  display: grid !important;
  min-width: 0;
  gap: 8px !important;
  align-content: start;
}

html[data-v7319-release] body.sample-request-page .bioten-request-form :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

html[data-v7319-release] body.sample-request-page .bioten-request-form textarea {
  min-height: 124px !important;
  padding: 14px 15px !important;
  line-height: 1.65 !important;
  resize: vertical;
}

/* Mobile packaging heroes: figures keep a browser-default 40px side margin,
   which makes a 100%-wide media card extend beyond the viewport. */
@media (max-width: 980px) {
  html[data-v7319-release][data-v7318-packaging-governance="packaging-family-r1"]
    body[data-v7318-packaging-professional="r30"] .bp7140-hero__media {
    box-sizing: border-box;
    min-width: 0;
    margin-inline: 0 !important;
  }

  html[data-v7319-release][data-v7318-packaging-governance="packaging-family-r1"]
    body[data-v7318-packaging-professional="r30"] .bp7140-media-note {
    text-align: center;
  }
}

/* Contact/project intake: retain the original content while giving headings,
   cards and form copy a consistent mobile safe area. */
@media (max-width: 760px) {
  html[data-v7319-release] body.contact-suite-page #main-content
    :is(
      .home-band > .home-section-title,
      .contact-channel-grid,
      .contact-intent-grid,
      .contact-form-layout,
      .bioten-faq-grid
    ) {
    box-sizing: border-box;
    width: calc(100% - 28px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  html[data-v7319-release] body.contact-suite-page #main-content
    .home-band > .home-section-title {
    padding-right: 14px !important;
    padding-left: 14px !important;
  }
}

html[data-v7319-release] body.fs7301-page .fs7301-section--deep h2 {
  color: #f6f8fb !important;
  -webkit-text-fill-color: #f6f8fb !important;
}

html[data-v7319-release] body.bioten-packaging-page #main-content
  :is(.packaging-hero-actions, .packaging-cta) > .packaging-button.primary {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-v7319-release] body.bioten-packaging-page :is(.packaging-process-grid, .packaging-proof-grid) article > span,
html[data-v7319-release] body.solutions-page .solutions-product-card > span {
  color: #5f4b1e !important;
}

/* BIOTEN program notes whose dark text was lost when their panel became light. */
html[data-v7319-release] body.v520-app--agriculture .v710-scope-note__label {
  color: #0c6f54 !important;
}

html[data-v7319-release] body.v520-app--care .v710-scope-note__label {
  color: #176c7b !important;
}

html[data-v7319-release] body.v245-page #main-content .v245-claim-boundary > strong {
  color: #0b607a !important;
  -webkit-text-fill-color: #0b607a !important;
}

html[data-v7319-release] body.v245-page #main-content .v245-claim-boundary > p {
  color: #3e5663 !important;
  -webkit-text-fill-color: #3e5663 !important;
}

/* Knowledge and observer utility pages. */
html[data-v7319-release] body #contact-knowledge > div > p {
  color: #3e5663 !important;
}

html[data-v7319-release] body #main-content li > small {
  color: #586a76;
}

html[data-v7319-release] body .scope-note {
  color: #59635d;
}

html[data-v7319-release] body.bioten-page.knowledge-page #main-content
  :is(.v270-pdf-link, [data-v281-external="true"]) > span {
  color: #665f55 !important;
  -webkit-text-fill-color: #665f55 !important;
}

html[data-v7319-release] body :is(.observer-breadcrumb, .observer-document-links) :is(a, span) {
  color: #596a7a;
}

/* Editorial links embedded in prose remain identifiable beyond color alone. */
html[data-v7319-release] body main :is(.bp7140-copy > a, a[data-news-cn][data-news-en]) {
  text-decoration-line: underline !important;
  text-decoration-thickness: .08em !important;
  text-underline-offset: .18em !important;
}

/* All explicitly focusable horizontal regions share one visible focus ring. */
html[data-v7319-release] :is(
  .observer-table-wrap,
  .brand510-scene-grid,
  .routing-table-wrap,
  .dv42-delivery-chain,
  .decision-table-wrap,
  .copy-text,
  .solutions-keyword-strip
)[tabindex="0"]:focus-visible {
  outline: 3px solid #1c7ea1;
  outline-offset: 3px;
}

/* Keyboard users need a visible focus target on horizontally scrollable tables. */
body[data-observer-design="v7318"] .observer-table-wrap:focus-visible {
  outline: 3px solid #1c7ea1;
  outline-offset: 3px;
}

/*
 * Mobile observer listings: use one publication per row across the homepage,
 * the Observer hub and both channel archives. Desktop grid composition and
 * every card's existing media/copy layout remain unchanged.
 */
@media (max-width: 760px) {
  html[data-v7319-release] body.dbc-home-page .observer-home__grid,
  html[data-v7319-release] body[data-observer-design="v7318"][data-observer-view="hub"]
    .observer-home-publications,
  html[data-v7319-release] body[data-observer-design="v7318"]
    :is(.observer-main--channel[data-observer-mode="company"], .observer-main--channel[data-observer-mode="industry"])
    .observer-publication-grid {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* Mobile news covers share one editorial frame. Wide 2.35:1 sources remain
     complete; 16:9 and 4:3 sources are center-cropped into the same rhythm. */
  html[data-v7319-release] body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[data-v7319-release] body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card__media {
    width: 100%;
    height: auto;
    min-height: 0;
    align-self: auto;
    aspect-ratio: 2.35 / 1 !important;
    background: #f4f1ea;
  }

  html[data-v7319-release] body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  html[data-v7319-release] body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card__body {
    min-height: 0 !important;
    padding: .9rem 1rem;
  }

  html[data-v7319-release][data-v7202-home-governance] body.dbc-home-page
    main#main-content .observer-home__grid .observer-home-card {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html[data-v7319-release][data-v7202-home-governance] body.dbc-home-page
    main#main-content .observer-home__grid .observer-home-card .observer-home-card__link {
    display: grid !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
  }

  html[data-v7319-release][data-v7202-home-governance] body.dbc-home-page
    main#main-content .observer-home__grid .observer-home-card .observer-home-card__media {
    position: relative !important;
    inset: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    aspect-ratio: 2.35 / 1 !important;
    background: #f4f1ea;
  }

  html[data-v7319-release][data-v7202-home-governance] body.dbc-home-page
    main#main-content .observer-home__grid .observer-home-card .observer-home-card__media img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: var(--observer-cover-position, center) !important;
  }

  html[data-v7319-release][data-v7202-home-governance] body.dbc-home-page
    main#main-content .observer-home__grid .observer-home-card .observer-home-card__scrim {
    display: none !important;
  }

  html[data-v7319-release][data-v7202-home-governance] body.dbc-home-page
    main#main-content .observer-home__grid .observer-home-card .observer-home-card__glass {
    position: relative !important;
    inset: auto !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: .72rem .82rem .78rem !important;
    background: rgba(246, 250, 250, .96) !important;
  }
}

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

/*
 * Chinese typography family unification.
 *
 * Keep every page's existing type scale, weight, line height and tracking;
 * only align the font family with the shared navigation. English mode and
 * technical monospace content retain their existing typefaces.
 */
html:not(#dbc-zh-font-family-lock-a):not(#dbc-zh-font-family-lock-b):not([lang="en"]):not([data-lang="en"]) {
  --dbc-zh-ui-font: "Neue Helvetica", "Helvetica Neue", Helvetica, "方正黑体简体", "FZHei-B01S", "FZHei", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

html:not(#dbc-zh-font-family-lock-a):not(#dbc-zh-font-family-lock-b):not([lang="en"]):not([data-lang="en"]) body,
html:not(#dbc-zh-font-family-lock-a):not(#dbc-zh-font-family-lock-b):not([lang="en"]):not([data-lang="en"]) body
  :where(*):not(code, code *, pre, pre *, kbd, kbd *, samp, samp *) {
  font-family: var(--dbc-zh-ui-font) !important;
}

/*
 * Shared heading typography.
 *
 * FangZheng Hei SC is installed as a Regular-only face on the audit
 * workstation. Several legacy page systems also disable font synthesis, so a
 * computed 700 could still render with Regular Chinese strokes. Restore weight
 * synthesis for headings and make common inline title fragments inherit the
 * same family and weight without changing the existing type scale or rhythm.
 */
:root {
  --dbc-heading-ui-font: "Neue Helvetica", "Helvetica Neue", Helvetica, "方正黑体简体", "FZHei-B01S", "FZHei", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

html:not(#dbc-heading-weight-lock-a):not(#dbc-heading-weight-lock-b):not(#dbc-heading-weight-lock-c):not(#dbc-heading-weight-lock-d):not(#dbc-heading-weight-lock-e):not(#dbc-heading-weight-lock-f):not(#dbc-heading-weight-lock-g):not(#dbc-heading-weight-lock-h) body
  :is(h1, h2, h3, h4, h5, h6, [role="heading"]),
html:not(#dbc-heading-weight-lock-a):not(#dbc-heading-weight-lock-b):not(#dbc-heading-weight-lock-c):not(#dbc-heading-weight-lock-d):not(#dbc-heading-weight-lock-e):not(#dbc-heading-weight-lock-f):not(#dbc-heading-weight-lock-g):not(#dbc-heading-weight-lock-h) body
  :is(h1, h2, h3, h4, h5, h6, [role="heading"])
  :where(span, em, strong, b, i, a, small, mark) {
  font-family: var(--dbc-heading-ui-font) !important;
  font-weight: 700 !important;
  font-synthesis: weight style small-caps !important;
}

/*
 * Site-wide content H2 scale.
 *
 * Keep navigation, footers and first-screen functional H2s unchanged by
 * limiting the rule to direct content branches of <main>. The two current
 * hero systems that contain H2s are explicitly excluded.
 */
html:not(#dbc-content-h2-size-lock-a):not(#dbc-content-h2-size-lock-b):not(#dbc-content-h2-size-lock-c):not(#dbc-content-h2-size-lock-d):not(#dbc-content-h2-size-lock-e):not(#dbc-content-h2-size-lock-f):not(#dbc-content-h2-size-lock-g):not(#dbc-content-h2-size-lock-h) body main > h2,
html:not(#dbc-content-h2-size-lock-a):not(#dbc-content-h2-size-lock-b):not(#dbc-content-h2-size-lock-c):not(#dbc-content-h2-size-lock-d):not(#dbc-content-h2-size-lock-e):not(#dbc-content-h2-size-lock-f):not(#dbc-content-h2-size-lock-g):not(#dbc-content-h2-size-lock-h) body main > :not(.bp7140-home-hero):not(.v520-dev-hero) h2 {
  font-size: 30px !important;
  width: 100% !important;
  max-width: none !important;
  white-space: normal !important;
  text-wrap: pretty !important;
}

/* Chinese content headings use natural wrapping instead of authored hard breaks. */
html:not([lang^="en"]):not([data-lang^="en"]):not(#dbc-content-h2-break-lock-a):not(#dbc-content-h2-break-lock-b):not(#dbc-content-h2-break-lock-c):not(#dbc-content-h2-break-lock-d) body main > h2 br,
html:not([lang^="en"]):not([data-lang^="en"]):not(#dbc-content-h2-break-lock-a):not(#dbc-content-h2-break-lock-b):not(#dbc-content-h2-break-lock-c):not(#dbc-content-h2-break-lock-d) body main > :not(.bp7140-home-hero):not(.v520-dev-hero) h2 br {
  display: none !important;
}

/* BIOTEN packaging home: align both functional H2s inside the hero module. */
html:not(#dbc-bioten-hero-h2-lock-a):not(#dbc-bioten-hero-h2-lock-b):not(#dbc-bioten-hero-h2-lock-c):not(#dbc-bioten-hero-h2-lock-d):not(#dbc-bioten-hero-h2-lock-e):not(#dbc-bioten-hero-h2-lock-f):not(#dbc-bioten-hero-h2-lock-g):not(#dbc-bioten-hero-h2-lock-h) body#bioten-packaging-home-r15 main#main-content .bp7140-home-hero h2 {
  font-size: 30px !important;
}

/* Mobile publication-card titles are metadata, not section headings. */
@media (max-width: 760px) {
  html:not(#dbc-content-h2-size-lock-a):not(#dbc-content-h2-size-lock-b):not(#dbc-content-h2-size-lock-c):not(#dbc-content-h2-size-lock-d):not(#dbc-content-h2-size-lock-e):not(#dbc-content-h2-size-lock-f):not(#dbc-content-h2-size-lock-g):not(#dbc-content-h2-size-lock-h)
    body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card h2,
  html:not(#dbc-content-h2-size-lock-a):not(#dbc-content-h2-size-lock-b):not(#dbc-content-h2-size-lock-c):not(#dbc-content-h2-size-lock-d):not(#dbc-content-h2-size-lock-e):not(#dbc-content-h2-size-lock-f):not(#dbc-content-h2-size-lock-g):not(#dbc-content-h2-size-lock-h)
    body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card h2 a {
    font-size: clamp(1.02rem, 4.6vw, 1.12rem) !important;
    line-height: 1.38 !important;
    letter-spacing: -.02em !important;
  }

  html[data-v7319-release] body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card__summary {
    margin-top: .55rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
  }

  html[data-v7319-release] body[data-observer-design="v7318"]
    :is(.observer-main--hub, .observer-main--channel)
    .observer-publication-card__read {
    margin-top: .65rem;
    padding-top: .55rem;
  }

  html[data-v7319-release][data-v7202-home-governance] body.dbc-home-page
    main#main-content .observer-home__grid .observer-home-card .observer-home-card__glass h3 {
    padding-right: 2rem !important;
    font-size: clamp(.88rem, 4vw, 1rem) !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2 !important;
  }
}
