/*
 * DBC / BIOTEN V7.17.1 shared system polish
 * Scope: resilient rendering, keyboard access and motion preferences.
 * Page-family composition and approved visual direction remain untouched.
 */

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: clamp(76px, 8vw, 112px);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] :target {
  scroll-margin-top: clamp(76px, 8vw, 112px);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] :where(img, video, svg) {
  max-width: 100%;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] :where(
  a,
  button,
  input,
  select,
  textarea,
  summary,
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 2px solid #0a63a7;
  outline-offset: 3px;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] :where(
  p,
  li,
  td,
  th,
  figcaption,
  address,
  a[href^="mailto:"]
) {
  overflow-wrap: break-word;
}

@supports (overflow: clip) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body {
    overflow-x: clip;
  }
}

/* Replace platform-dependent flag emoji with stable market codes. */
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] .compliance-map-page .compliance-map-shell .dog-marker .dog {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #004a96;
  border-color: rgba(0, 74, 150, .42);
  background: linear-gradient(180deg, #ffffff, #eef5fb);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] .compliance-map-page .compliance-map-shell :where(.market-flag, .swatch.dog) {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #004a96;
}

@media (prefers-contrast: more) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] :where(
    a,
    button,
    input,
    select,
    textarea,
    summary,
    [tabindex]:not([tabindex="-1"])
  ):focus-visible {
    outline-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] {
    scroll-behavior: auto !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] *,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] *::before,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] :where(
    a,
    button,
    input,
    select,
    textarea,
    summary,
    [tabindex]:not([tabindex="-1"])
  ):focus-visible {
    outline: 2px solid CanvasText;
  }
}

/* --------------------------------------------------------------------------
 * V7.17.1 group-company page family closure
 *
 * V7.7 introduced a useful global heading hierarchy, but its high-specificity
 * blue heading rule could override text that sits on dark brand surfaces.
 * This final layer restores an explicit surface-to-text contract for the DBC
 * group pages and the five specialist brand pages.
 * -------------------------------------------------------------------------- */

/* DBC group pages: dark information bands and image overlays. */
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main :is(
  .v500-section--dark,
  .v500-final,
  .v570-company-profile
) :is(h2, h3, strong) {
  color: #f7fbfd !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main :is(
  .v500-section--dark,
  .v500-final,
  .v570-company-profile
) :is(p, li, dd) {
  color: rgba(233, 244, 247, .78) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route::after {
  inset: 12% 0 0;
  background: linear-gradient(180deg, rgba(4, 19, 29, 0) 0%, rgba(4, 19, 29, .34) 42%, rgba(4, 19, 29, .94) 100%);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route__copy :is(h3, a) {
  color: #fff !important;
  text-shadow: 0 1px 12px rgba(1, 16, 25, .28);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route__copy :is(span, p) {
  color: rgba(244, 249, 250, .84) !important;
  opacity: 1;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main :is(.v500-card, .v500-fact, .v500-evidence__list article) :is(h3, strong) {
  color: #132d3b !important;
}

/* Five-brand overview: stable 3 + 2 desktop composition. */
@media (min-width: 1181px) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5 > *,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 > * {
    grid-column: span 2 !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5 > :nth-last-child(-n + 2),
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 > :nth-last-child(-n + 2) {
    grid-column: span 3 !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 .v500-route {
    min-height: 350px;
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5 > *,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 > * {
    grid-column: auto !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5 > :last-child,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 > :last-child {
    grid-column: 1 / -1 !important;
  }
}

/* Specialist brand pages: restore each brand palette and readable surfaces. */
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site {
  --brand510-readable-accent: var(--brand510-accent-deep);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site .brand510-shell {
  width: min(1240px, calc(100% - clamp(40px, 6vw, 88px)));
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section {
  padding-block: clamp(70px, 7.4vw, 96px);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section__head {
  gap: clamp(30px, 5vw, 72px);
  margin-bottom: clamp(32px, 4vw, 48px);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section:not(.brand510-section--dark) .brand510-section__head h2,
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-layer-copy h2 {
  color: var(--brand510-accent-deep) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-kicker {
  color: var(--brand510-readable-accent) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
  .brand510-hero,
  .brand510-section--dark,
  .brand510-brand-panel--accent,
  .brand510-scene__copy,
  .brand510-focus,
  .brand510-final,
  .brand510-hero__badge
) :is(h1, h2, h3, strong) {
  color: #f8fbfa !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
  .brand510-hero,
  .brand510-section--dark,
  .brand510-brand-panel--accent,
  .brand510-scene__copy,
  .brand510-focus,
  .brand510-final,
  .brand510-hero__badge
) :is(p, li, dd) {
  color: rgba(242, 248, 246, .78) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
  .brand510-hero,
  .brand510-section--dark,
  .brand510-brand-panel--accent,
  .brand510-scene__copy,
  .brand510-focus,
  .brand510-final,
  .brand510-hero__badge
) .brand510-kicker {
  color: color-mix(in srgb, var(--brand510-accent-soft) 88%, #fff) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section--dark {
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--brand510-accent) 20%, transparent), transparent 34rem),
    var(--brand510-dark) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-focus {
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--brand510-accent) 17%, transparent), transparent 28rem),
    var(--brand510-dark);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-final {
  background:
    linear-gradient(112deg, var(--brand510-accent-deep), color-mix(in srgb, var(--brand510-accent-deep) 76%, var(--brand510-dark)) 72%, var(--brand510-dark));
}

/* Light structure cards nested inside dark sections must remain dark-on-light. */
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section--dark .brand510-layer {
  background: rgba(255, 255, 255, .97);
  color: var(--brand510-ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section--dark .brand510-layer strong {
  color: var(--brand510-ink) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section--dark .brand510-layer span {
  color: var(--brand510-accent-deep) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section--dark .brand510-layer p {
  color: #53635f !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(.brand510-product, .brand510-story, .brand510-tech, .brand510-capability) :is(h3, strong) {
  color: var(--brand510-ink) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(.brand510-product, .brand510-story, .brand510-tech, .brand510-capability) p {
  color: #526460 !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-story a,
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site .brand510-localnav a {
  color: var(--brand510-accent-deep);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(.brand510-hero, .brand510-final) .brand510-action {
  color: #fff !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
  .brand510-hero__badge span,
  .brand510-scene__copy span,
  .brand510-step span,
  .brand510-focus__list span
) {
  color: rgba(247, 251, 250, .74) !important;
}

/* Shared footer: small legal text must remain readable on the navy surface. */
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body:is(.v500-page--dbc, .brand510-site) footer.formal-site-footer .footer-note {
  max-width: 64rem !important;
  color: rgba(244, 249, 251, .76) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body:is(.v500-page--dbc, .brand510-site) footer.formal-site-footer .footer-column a {
  color: rgba(244, 249, 251, .72) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body:is(.v500-page--dbc, .brand510-site) footer.formal-site-footer .footer-legal,
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body:is(.v500-page--dbc, .brand510-site) footer.formal-site-footer .footer-legal :is(a, span) {
  color: rgba(244, 249, 251, .66) !important;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body:is(.v500-page--dbc, .brand510-site) footer.formal-site-footer .footer-bottom > strong {
  color: #fff !important;
}

/* The DBC mega menu stays a light, self-contained reading surface regardless
   of the specialist page palette below it. */
html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.dbc-global-nav-active .dbc-desktop-mega--dbc {
  color-scheme: light;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 74, 150, .055), transparent 27rem),
    rgba(250, 252, 253, .985);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.dbc-global-nav-active .dbc-desktop-mega--dbc .dbc-desktop-route {
  border-color: rgba(16, 55, 75, .15);
  background: rgba(255, 255, 255, .94);
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.dbc-global-nav-active .dbc-desktop-mega--dbc .dbc-desktop-route__copy strong {
  color: #132d3b;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.dbc-global-nav-active .dbc-desktop-mega--dbc .dbc-desktop-route__desc {
  color: #4c626d;
}

@media (max-width: 860px) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site .brand510-shell {
    width: min(100% - 36px, 760px);
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section {
    padding-block: 62px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section__head {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site .brand510-localnav__inner {
    align-items: flex-start;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site .brand510-localnav nav {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site .brand510-localnav nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 720px) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5 > *,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 > * {
    grid-column: auto !important;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route {
    min-height: 320px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route__copy {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site .brand510-shell {
    width: min(100% - 28px, 560px);
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section {
    padding-block: 52px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-hero__copy {
    padding-block: 58px 52px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-final {
    padding-block: 54px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body:is(.v500-page--dbc, .brand510-site) footer.formal-site-footer .footer-legal {
    gap: 6px 14px !important;
  }
}

/* --------------------------------------------------------------------------
 * V7.17.1 group-company editorial density polish
 *
 * Keep primary products and evidence in the normal document flow. Secondary
 * visual stories become compact, discoverable scroll tracks on phones so the
 * page remains complete without turning into an excessively long stack.
 * -------------------------------------------------------------------------- */

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-hero__lead {
  max-width: 54ch;
  text-wrap: pretty;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section__head > p {
  width: 100%;
  max-width: 58ch;
  justify-self: end;
  text-wrap: pretty;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
  .brand510-product,
  .brand510-story,
  .brand510-tech,
  .brand510-capability
) {
  display: flex;
  flex-direction: column;
  height: 100%;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
  .brand510-product__copy,
  .brand510-story__copy,
  .brand510-tech__copy
) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-story a {
  margin-top: auto;
  padding-top: 18px;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
  .brand510-product p,
  .brand510-story p,
  .brand510-tech p,
  .brand510-capability p
) {
  text-wrap: pretty;
}

html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5 .v500-card {
  min-height: 210px;
  padding: 26px;
}

@media (max-width: 720px) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-card-grid--5 .v500-card {
    min-height: 172px;
    padding: 22px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 {
    display: grid !important;
    grid-auto-columns: min(82vw, 340px);
    grid-auto-flow: column;
    grid-template-columns: none !important;
    gap: 14px !important;
    margin-inline: -14px;
    padding: 2px 14px 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 14px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5::-webkit-scrollbar {
    display: none;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 > * {
    grid-column: auto !important;
    scroll-snap-align: start;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.v500-page--dbc main .v500-route-grid--5 .v500-route {
    min-height: 304px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-section__head > p {
    max-width: 62ch;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
    .brand510-scene-grid,
    .brand510-story-grid
  ) {
    display: grid;
    grid-auto-columns: min(82vw, 340px);
    grid-auto-flow: column;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    gap: 14px;
    margin-inline: -14px;
    padding: 2px 14px 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 14px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
    .brand510-scene-grid,
    .brand510-story-grid
  )::-webkit-scrollbar {
    display: none;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main :is(
    .brand510-scene,
    .brand510-scene:first-child,
    .brand510-story,
    .brand510-story:first-child
  ) {
    grid-column: auto !important;
    grid-row: auto !important;
    scroll-snap-align: start;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-scene {
    height: 314px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-story figure,
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-story:first-child figure {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-capability {
    min-height: auto;
    padding: 22px 22px 24px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-capability span {
    margin-bottom: 22px;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-capability strong {
    font-size: 18px;
    line-height: 1.42;
  }

  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-focus__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
  }
}

@media (min-width: 480px) and (max-width: 620px) {
  html[data-v7171-release="full-site-system-audit-polish-v7.17.1"] body.brand510-site main .brand510-capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
