/*
 * Crossbrand89 is an additive correction layer over the frozen Crossbrand88
 * release. It owns the shared responsive portrait lanes, persistent controls,
 * the KS diagnostic readouts, the KJ people/network repair and the WhatsApp
 * profile presentation.
 */
html[data-crossbrand89] {
  --cb89-control: 48px;
  --cb89-edge: 12px;
  --cb89-gap: 7px;
  --cb89-person: min(calc((100svh - 50px) * 1.04), 220vw);
  --cb89-woman: .9659090909;
  --cb89-shoe: 1.5svh;
}

/*
 * One control geometry for every brand. At ordinary desktop/tablet sizes the
 * controls remain 56px; large 100%-zoom screens scale smoothly to 64px. The
 * same top/right inset is retained before and after scrolling or opening.
 */
@media (min-width: 768px) and (min-height: 601px) {
  html[data-crossbrand89] {
    --cb89-control: clamp(56px, 2.5vw, 64px);
    --cb89-edge: clamp(24px, 1.25vw, 32px);
    --cb89-gap: clamp(8px, .55vw, 14px);
  }

  html[data-crossbrand89] body section.hero .kp-header61 .kp-toggle61,
  html[data-crossbrand89].kp61-scrolled body section.hero .kp-header61 .kp-toggle61,
  html[data-crossbrand89="aa"] body .kp-function-toggle,
  html[data-crossbrand89="ks"] body .kp-function-toggle,
  html[data-crossbrand89="kj"] body .kp-function-toggle-v17,
  html[data-crossbrand89] body :is(.kp-whatsapp, .kp-whatsapp-v17, .kp-up, .kp-up-v17) {
    box-sizing: border-box !important;
    width: var(--cb89-control) !important;
    min-width: var(--cb89-control) !important;
    max-width: var(--cb89-control) !important;
    height: var(--cb89-control) !important;
    min-height: var(--cb89-control) !important;
    max-height: var(--cb89-control) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgb(255 255 255 / 44%) !important;
    border-radius: 8px !important;
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 24%),
      0 7px 18px rgb(0 22 35 / 24%) !important;
  }

  html[data-crossbrand89] body section.hero .kp-header61 .kp-toggle61,
  html[data-crossbrand89].kp61-scrolled body section.hero .kp-header61 .kp-toggle61 {
    position: fixed !important;
    inset: var(--cb89-edge) var(--cb89-edge) auto auto !important;
    transition-property: background-color, border-color, box-shadow, filter !important;
  }

  html[data-crossbrand89="aa"] body .kp-contact-dock,
  html[data-crossbrand89="ks"] body .kp-contact-dock,
  html[data-crossbrand89="kj"] body .kp-contact-dock-v17 {
    inset: auto var(--cb89-edge) var(--cb89-edge) auto !important;
  }

  html[data-crossbrand89] body :is(.kp-up, .kp-up-v17) {
    right: calc(var(--cb89-edge) + var(--cb89-control) + var(--cb89-gap)) !important;
    bottom: var(--cb89-edge) !important;
  }
}

/*
 * Desktop and tablet portraits share a protected right-hand lane. Crossbrand88
 * already has the correct 1280-1536px bridge; these rules close the two gaps on
 * wide desktops and on tablets without touching phone layouts.
 */
@media (min-width: 1537px) and (min-height: 601px) and (orientation: landscape) {
  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-stefan, .hero-person-stefan, img.kp-full-man) {
    right: calc(33% - var(--cb88-person, var(--cb89-person)) * .3066) !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-ludmilla, .hero-person-ludmilla, img.kp-full-woman) {
    right: calc(33% - var(--cb88-person, var(--cb89-person)) * .4366) !important;
  }
}

@media (min-width: 768px) and (max-width: 1279px) and (min-height: 601px) {
  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-stefan, .hero-person-stefan, img.kp-full-man) {
    right: calc(35.5% - var(--cb88-person, var(--cb89-person)) * .3066) !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-ludmilla, .hero-person-ludmilla, img.kp-full-woman) {
    right: calc(35.5% - var(--cb88-person, var(--cb89-person)) * .4366) !important;
  }
}

/* KS desktop/tablet: APO10, TKTL1 and Bildgebung form one deliberate diagnostic
 * column in the clear lane between the copy and the shifted portraits. */
@media (min-width: 1280px) and (min-height: 601px) {
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 {
    position: absolute !important;
    inset: 25% auto auto 44% !important;
    display: grid !important;
    grid-template-columns: clamp(96px, 6.7vw, 128px) !important;
    gap: 8px !important;
    width: clamp(96px, 6.7vw, 128px) !important;
    transform: none !important;
    z-index: 5 !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 7px 9px !important;
  }

  html[data-crossbrand89="ks"] body .ks-analysis-stage .ks-readout-c {
    display: flex !important;
    position: absolute !important;
    inset: calc(25% + 128px) auto auto 44% !important;
    box-sizing: border-box !important;
    width: clamp(96px, 6.7vw, 128px) !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 56px !important;
    min-height: 56px !important;
    transform: none !important;
    z-index: 5 !important;
  }
}

@media (min-width: 900px) and (max-width: 1279px) and (min-height: 601px) {
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 {
    position: absolute !important;
    inset: 25% auto auto 40% !important;
    display: grid !important;
    grid-template-columns: 96px !important;
    gap: 8px !important;
    width: 96px !important;
    transform: none !important;
    z-index: 5 !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 6px 8px !important;
  }

  html[data-crossbrand89="ks"] body .ks-analysis-stage .ks-readout-c {
    display: flex !important;
    position: absolute !important;
    inset: calc(25% + 124px) auto auto 40% !important;
    box-sizing: border-box !important;
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 54px !important;
    min-height: 54px !important;
    transform: none !important;
    z-index: 5 !important;
  }
}

@media (min-width: 768px) and (max-width: 899px) and (min-height: 601px) {
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 {
    position: absolute !important;
    inset: auto auto calc(var(--cb89-edge) + var(--cb89-control) + 24px) var(--cb89-edge) !important;
    display: grid !important;
    grid-template-columns: 72px !important;
    gap: 6px !important;
    width: 72px !important;
    transform: none !important;
    z-index: 5 !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 5px !important;
  }

  html[data-crossbrand89="ks"] body .ks-analysis-stage .ks-readout-c {
    display: none !important;
  }
}

/* The compact controls follow one square, lightly contoured design language. */
@media (max-width: 767px), (max-height: 600px) and (orientation: landscape) {
  html[data-crossbrand89] body section.hero .kp-header61 .kp-toggle61,
  html[data-crossbrand89="aa"] body .kp-function-toggle,
  html[data-crossbrand89="ks"] body .kp-function-toggle,
  html[data-crossbrand89="kj"] body .kp-function-toggle-v17,
  html[data-crossbrand89] body :is(.kp-whatsapp, .kp-whatsapp-v17, .kp-up, .kp-up-v17) {
    box-sizing: border-box !important;
    width: var(--cb89-control) !important;
    min-width: var(--cb89-control) !important;
    max-width: var(--cb89-control) !important;
    height: var(--cb89-control) !important;
    min-height: var(--cb89-control) !important;
    max-height: var(--cb89-control) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgb(255 255 255 / 44%) !important;
    border-radius: 8px !important;
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 24%),
      0 5px 14px rgb(0 22 35 / 24%) !important;
  }

  html[data-crossbrand89="kj"][data-brand61="kj"][data-ui83="kj"] body.kp-controls-v18-ready .kp-function-dock-v17 > button.kp-function-toggle-v17 {
    width: var(--cb89-control) !important;
    min-width: var(--cb89-control) !important;
    max-width: var(--cb89-control) !important;
    height: var(--cb89-control) !important;
    min-height: var(--cb89-control) !important;
    max-height: var(--cb89-control) !important;
    padding: 0 !important;
    border-radius: 8px !important;
  }

  html[data-crossbrand89="kj"] body .kp-function-toggle-v17 .kp-function-toggle-grid-v17 {
    display: grid !important;
    grid-template-columns: repeat(2, 5px) !important;
    grid-template-rows: repeat(2, 5px) !important;
    gap: 4px !important;
    width: 14px !important;
    height: 14px !important;
  }

  html[data-crossbrand89="kj"] body .kp-function-toggle-v17 .kp-function-toggle-grid-v17 > i {
    display: block !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    opacity: 1 !important;
  }

  html[data-crossbrand89] body :is(.kp-whatsapp, .kp-whatsapp-v17) {
    border-color: rgb(204 255 224 / 62%) !important;
  }

  html[data-crossbrand89] body section.hero .kp-header61 .kp-toggle61 {
    position: fixed !important;
    inset: var(--cb89-edge) var(--cb89-edge) auto auto !important;
    transition-property: background-color, border-color, box-shadow, filter !important;
  }

  html[data-crossbrand89] body section.hero .kp-header61 nav[aria-label*="Hauptnavigation"]:not([hidden]) {
    right: var(--cb89-edge) !important;
    left: auto !important;
    box-sizing: border-box !important;
    width: min(510px, calc(100% - 2 * var(--cb89-edge))) !important;
    max-width: calc(100% - 2 * var(--cb89-edge)) !important;
  }

  html[data-crossbrand89="aa"] body #aa33-main-navigation > .kp61-mobile-services > :is(.header-message, .header-login) {
    display: none !important;
  }

  html[data-crossbrand89="kj"].kp61-scrolled body section.hero .kp-header61 .kp-toggle61 {
    inset: var(--cb89-edge) var(--cb89-edge) auto auto !important;
  }

  html[data-crossbrand89="aa"] body .kp-function-dock,
  html[data-crossbrand89="ks"] body .kp-function-dock,
  html[data-crossbrand89="kj"] body .kp-function-dock-v17 {
    inset: auto auto var(--cb89-edge) var(--cb89-edge) !important;
  }

  html[data-crossbrand89="aa"] body .kp-contact-dock,
  html[data-crossbrand89="ks"] body .kp-contact-dock,
  html[data-crossbrand89="kj"] body .kp-contact-dock-v17 {
    inset: auto var(--cb89-edge) var(--cb89-edge) auto !important;
  }
}

/*
 * Portrait phones: the first visual stage is exactly one viewport. The header
 * overlays the scene instead of consuming part of it; text and title cards stay
 * in their established flow after the complete visual stage.
 */
@media (max-width: 767px) and (orientation: portrait) {
  html[data-crossbrand89] body section.hero.kp-full-header {
    --kp-full-height: 100svh !important;
    --kp-full-nav: 0px !important;
    --kp-scene-top: 0px !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header > .kp-header61 {
    position: absolute !important;
    inset: 0 0 auto !important;
    z-index: 10020 !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: var(--cb89-edge) calc(var(--cb89-edge) + var(--cb89-control) + var(--cb89-gap)) 0 var(--cb89-edge) !important;
    background: none !important;
  }

  /* KJ's retained qualification cards are relocated by its load-time owner.
   * Keep them below the first viewport during that brief hand-off so they can
   * never push the portrait stage down or cover the brand mark on first paint.
   */
  html[data-crossbrand89="kj"] body section.hero.kp-full-header:not(.kp-title-host-approved) > .kp-founder-credentials-v20 {
    position: absolute !important;
    inset: 100svh var(--cb89-edge) auto !important;
    width: auto !important;
    margin: 0 !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header > .kp-full-scene {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100svh !important;
    min-height: 100svh !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100svh !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    transform: none !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-stefan, .hero-person-stefan, img.kp-full-man) {
    position: absolute !important;
    z-index: 3 !important;
    inset: auto calc(50% - var(--cb89-person) * .3066 + clamp(16px, 6vw, 25px)) calc(var(--cb89-shoe) - var(--cb89-person) * .05104) auto !important;
    width: auto !important;
    max-width: none !important;
    height: var(--cb89-person) !important;
    max-height: none !important;
    object-fit: contain !important;
    transform: none !important;
    filter: drop-shadow(8px 12px 14px rgb(1 29 47 / 22%)) !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-ludmilla, .hero-person-ludmilla, img.kp-full-woman) {
    position: absolute !important;
    z-index: 2 !important;
    inset: auto calc(50% - var(--cb89-person) * .43 + clamp(70px, 19vw, 82px)) calc(var(--cb89-shoe) - var(--cb89-person) * var(--cb89-woman) * .05104) auto !important;
    width: auto !important;
    max-width: none !important;
    height: calc(var(--cb89-person) * var(--cb89-woman)) !important;
    max-height: none !important;
    object-fit: contain !important;
    transform: none !important;
  }

  /* KS: the two actual biomarkers live in the free lower-left lane. */
  html[data-crossbrand89="ks"] body .ks-analysis-stage {
    contain: paint !important;
    overflow: hidden !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 {
    position: absolute !important;
    inset: auto auto 74px 8px !important;
    display: grid !important;
    grid-template-columns: 64px !important;
    gap: 5px !important;
    width: 64px !important;
    transform: none !important;
    z-index: 5 !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 4px !important;
    border-radius: 7px !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-readout-a,
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-readout-b { bottom: auto !important; }
  html[data-crossbrand89="ks"] body .ks-analysis-stage .ks-readout-c { display: none !important; }
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout > span {
    font-size: 12px !important;
    line-height: 1 !important;
  }
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout > strong {
    margin-top: 3px !important;
    font-size: 6.5px !important;
    line-height: 1.15 !important;
  }
}

/* On very narrow phones, preserve the zero-overlap lane beside Stefan's arm. */
@media (max-width: 360px) and (orientation: portrait) {
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 {
    grid-template-columns: 52px !important;
    width: 52px !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 4px !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout > span {
    font-size: 11px !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout > strong {
    font-size: 6px !important;
  }
}

/* Phone landscape keeps one complete visual viewport and the same control grid. */
@media (max-height: 600px) and (orientation: landscape) {
  html[data-crossbrand89] {
    --cb89-person: min(calc(100svh - 58px), 72vw);
  }

  html[data-crossbrand89] body section.hero.kp-full-header {
    --kp-full-height: 100svh !important;
    --kp-full-nav: 0px !important;
    --kp-scene-top: 0px !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header > .kp-header61 {
    position: absolute !important;
    inset: 0 0 auto !important;
    z-index: 10020 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: var(--cb89-edge) calc(var(--cb89-edge) + var(--cb89-control) + var(--cb89-gap)) 0 var(--cb89-edge) !important;
    background: none !important;
  }

  /* Reserve separate opaque lanes for the wide logo and both portraits. */
  html[data-crossbrand89] body section.hero.kp-full-header > .kp-header61 :is(.kp-logo61-free img, .brand img) {
    width: min(46vw, 390px) !important;
    max-width: min(46vw, 390px) !important;
    height: auto !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header > .kp-full-scene,
  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits {
    height: 100svh !important;
    min-height: 100svh !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
    transform: none !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-stefan, .hero-person-stefan, img.kp-full-man) {
    position: absolute !important;
    z-index: 3 !important;
    inset: auto calc(50% - var(--cb89-person) * .3066 - 72px) calc(var(--cb89-shoe) - var(--cb89-person) * .05104) auto !important;
    width: auto !important;
    max-width: none !important;
    height: var(--cb89-person) !important;
    max-height: none !important;
    object-fit: contain !important;
    transform: none !important;
  }

  html[data-crossbrand89] body section.hero.kp-full-header .kp-full-portraits :is(.hero-founder-ludmilla, .hero-person-ludmilla, img.kp-full-woman) {
    position: absolute !important;
    z-index: 2 !important;
    inset: auto calc(50% - var(--cb89-person) * .43 - 112px) calc(var(--cb89-shoe) - var(--cb89-person) * var(--cb89-woman) * .05104) auto !important;
    width: auto !important;
    max-width: none !important;
    height: calc(var(--cb89-person) * var(--cb89-woman)) !important;
    max-height: none !important;
    object-fit: contain !important;
    transform: none !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 {
    position: absolute !important;
    inset: auto auto var(--cb89-edge) calc(var(--cb89-edge) + var(--cb89-control) + var(--cb89-gap)) !important;
    display: grid !important;
    grid-template-columns: repeat(2, 86px) !important;
    gap: 8px !important;
    width: auto !important;
    transform: none !important;
    z-index: 5 !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 6px !important;
    border-radius: 8px !important;
  }

  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-readout-a,
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-readout-b { bottom: auto !important; }
  html[data-crossbrand89="ks"] body .ks-analysis-stage .ks-readout-c { display: none !important; }
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout > span {
    font-size: 14px !important;
    line-height: 1 !important;
  }
  html[data-crossbrand89="ks"] body .ks-biomarker-rail57 .ks-analysis-readout > strong {
    margin-top: 4px !important;
    font-size: 7px !important;
    line-height: 1.15 !important;
  }
}

/* Final KS desktop/tablet composition: all three diagnostic cards share one
 * aligned bottom rail. This clears hero copy, portraits, logo and fixed controls
 * at 1920, 1366, 1024 and 768px while keeping the phone layout unchanged. */
@media (min-width: 900px) and (min-height: 601px) {
  html[data-crossbrand89="ks"] {
    --ks89-card-width: 96px;
    --ks89-card-height: 56px;
    --ks89-image-width: 108px;
    --ks89-row-left: 68px;
  }

  html[data-crossbrand89="ks"] body section.hero .ks-biomarker-rail57 {
    position: absolute !important;
    inset:
      calc(100svh - var(--cb89-edge) - var(--ks89-card-height))
      auto
      auto
      var(--ks89-row-left) !important;
    display: grid !important;
    grid-template-columns: repeat(2, var(--ks89-card-width)) !important;
    gap: 8px !important;
    width: auto !important;
    transform: none !important;
    z-index: 5 !important;
  }

  html[data-crossbrand89="ks"] body section.hero .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: var(--ks89-card-width) !important;
    min-width: var(--ks89-card-width) !important;
    max-width: var(--ks89-card-width) !important;
    height: var(--ks89-card-height) !important;
    min-height: var(--ks89-card-height) !important;
    max-height: var(--ks89-card-height) !important;
    padding: 6px 8px !important;
  }

  html[data-crossbrand89="ks"] body section.hero .ks-analysis-stage .ks-readout-c {
    display: flex !important;
    position: absolute !important;
    inset:
      calc(100svh - var(--cb89-edge) - var(--ks89-card-height))
      auto
      auto
      calc(var(--ks89-row-left) + var(--ks89-card-width) + var(--ks89-card-width) + 16px) !important;
    box-sizing: border-box !important;
    width: var(--ks89-image-width) !important;
    min-width: var(--ks89-image-width) !important;
    max-width: var(--ks89-image-width) !important;
    height: var(--ks89-card-height) !important;
    min-height: var(--ks89-card-height) !important;
    max-height: var(--ks89-card-height) !important;
    transform: none !important;
    z-index: 5 !important;
  }
}

@media (min-width: 1280px) and (min-height: 601px) {
  html[data-crossbrand89="ks"] {
    --ks89-card-width: clamp(96px, 6.7vw, 128px);
    --ks89-row-left: clamp(68px, 5vw, 96px);
  }
}

@media (min-width: 1537px) and (min-height: 601px) {
  html[data-crossbrand89="ks"] {
    --ks89-image-width: var(--ks89-card-width);
  }
}

@media (min-width: 768px) and (max-width: 899px) and (min-height: 601px) {
  html[data-crossbrand89="ks"] {
    --ks89-card-width: 72px;
    --ks89-card-height: 48px;
    --ks89-image-width: 108px;
    --ks89-row-left: var(--cb89-edge);
  }

  html[data-crossbrand89="ks"] body section.hero .ks-biomarker-rail57 {
    position: absolute !important;
    inset:
      calc(100svh - var(--cb89-edge) - var(--ks89-card-height))
      auto
      auto
      var(--ks89-row-left) !important;
    display: grid !important;
    grid-template-columns: repeat(2, var(--ks89-card-width)) !important;
    gap: 8px !important;
    width: auto !important;
    transform: none !important;
    z-index: 5 !important;
  }

  html[data-crossbrand89="ks"] body section.hero .ks-biomarker-rail57 .ks-analysis-readout:is(.ks-readout-a, .ks-readout-b) {
    position: relative !important;
    inset: auto !important;
    width: var(--ks89-card-width) !important;
    min-width: var(--ks89-card-width) !important;
    max-width: var(--ks89-card-width) !important;
    height: var(--ks89-card-height) !important;
    min-height: var(--ks89-card-height) !important;
    max-height: var(--ks89-card-height) !important;
    box-sizing: border-box !important;
    padding: 5px !important;
  }

  html[data-crossbrand89="ks"] body section.hero .ks-biomarker-rail57 .ks-analysis-readout > span {
    font-size: 13px !important;
    line-height: 1 !important;
  }

  html[data-crossbrand89="ks"] body section.hero .ks-biomarker-rail57 .ks-analysis-readout > strong {
    margin-top: 2px !important;
    font-size: 6px !important;
    line-height: 1 !important;
  }

  html[data-crossbrand89="ks"] body section.hero .ks-analysis-stage .ks-readout-c {
    display: flex !important;
    position: absolute !important;
    inset:
      calc(100svh - var(--cb89-edge) - var(--ks89-card-height))
      auto
      auto
      calc(var(--ks89-row-left) + var(--ks89-card-width) + var(--ks89-card-width) + 16px) !important;
    width: var(--ks89-image-width) !important;
    min-width: var(--ks89-image-width) !important;
    max-width: var(--ks89-image-width) !important;
    height: var(--ks89-card-height) !important;
    min-height: var(--ks89-card-height) !important;
    max-height: var(--ks89-card-height) !important;
    transform: none !important;
    z-index: 5 !important;
  }
}

/* Real portrait avatar, clipped inside the existing native WhatsApp card. */
html[data-crossbrand89] body :is(.kp-whatsapp-card, .kp-whatsapp-card-v17) > div:first-of-type {
  align-items: center !important;
}

html[data-crossbrand89] body .cb89-avatar-shell {
  display: block !important;
  flex: 0 0 54px !important;
  width: 54px !important;
  min-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
  border: 2px solid rgb(255 255 255 / 76%) !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: #d9eff3 !important;
  box-shadow: 0 2px 8px rgb(0 31 45 / 24%) !important;
}

html[data-crossbrand89] body .cb89-avatar-shell > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: 50% 0 !important;
  transform: scale(2) !important;
  transform-origin: 50% 0 !important;
}

html[data-crossbrand89] body :is(.kp-whatsapp-card, .kp-whatsapp-card-v17) > div:first-of-type > span:last-child {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

html[data-crossbrand89] body :is(.kp-whatsapp-card, .kp-whatsapp-card-v17) .cb89-specialist,
html[data-crossbrand89] body :is(.kp-whatsapp-card, .kp-whatsapp-card-v17) .cb89-degree {
  display: block !important;
  max-width: 270px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

html[data-crossbrand89] body :is(.kp-whatsapp-card, .kp-whatsapp-card-v17) .cb89-specialist {
  font-weight: 700 !important;
}

/*
 * KJ people section: the qualification tiles are real layout rows below the
 * cut-outs. They are never absolutely positioned over shoes, shadows or legs.
 */
html[data-crossbrand89="kj"] body section.people {
  min-height: 0 !important;
  height: auto !important;
  align-items: center !important;
  overflow: visible !important;
}

html[data-crossbrand89="kj"] body section.people .people-visual {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 14px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: clamp(24px, 2.4vw, 46px) clamp(18px, 2vw, 38px) clamp(20px, 2vw, 36px) !important;
  align-items: stretch !important;
  overflow: visible !important;
}

html[data-crossbrand89="kj"] body section.people .people-visual > figure {
  display: grid !important;
  grid-template-rows: minmax(360px, 590px) auto !important;
  align-items: end !important;
  justify-self: stretch !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

html[data-crossbrand89="kj"] body section.people .people-visual > figure > img {
  position: relative !important;
  grid-row: 1 !important;
  align-self: end !important;
  justify-self: center !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 590px !important;
  object-fit: contain !important;
  object-position: 50% 100% !important;
}

html[data-crossbrand89="kj"] body section.people .people-visual > figure > figcaption.cb89-person-title {
  position: static !important;
  inset: auto !important;
  grid-row: 2 !important;
  display: grid !important;
  gap: 2px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 112px !important;
  margin: 14px 0 0 !important;
  padding: 12px 14px 13px !important;
  border: 1px solid rgb(207 38 62 / 28%) !important;
  border-top: 4px solid #cf263e !important;
  border-radius: 8px !important;
  background: rgb(255 255 255 / 96%) !important;
  color: #0b2940 !important;
  text-align: left !important;
  box-shadow: 0 8px 22px rgb(1 28 47 / 13%) !important;
  transform: none !important;
}

html[data-crossbrand89="kj"] body section.people .cb89-person-title > strong {
  margin: 0 0 2px !important;
  color: #0b2940 !important;
  font-size: clamp(15px, .9vw, 18px) !important;
  line-height: 1.15 !important;
}

html[data-crossbrand89="kj"] body section.people .cb89-person-title > span {
  display: block !important;
  color: #23445c !important;
  font-size: clamp(10px, .62vw, 12px) !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
}

@media (max-width: 1200px) {
  html[data-crossbrand89="kj"] body section.people .people-visual > figure {
    grid-template-rows: auto auto !important;
  }

  html[data-crossbrand89="kj"] body section.people .people-visual > figure > img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(56svh, 480px) !important;
  }
}

@media (max-width: 640px) {
  html[data-crossbrand89="kj"] body section.people .people-visual {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  html[data-crossbrand89="kj"] body section.people .people-visual > figure {
    grid-template-rows: auto auto !important;
  }

  html[data-crossbrand89="kj"] body section.people .people-visual > figure > img {
    width: auto !important;
    max-width: 100% !important;
    height: clamp(320px, 56svh, 480px) !important;
    max-height: 56svh !important;
  }
}

/*
 * The brand network is a full-width section followed by a real responsive card
 * grid. The old selector accidentally made the heading and grid two of five
 * tiny columns, which caused the narrow vertical stack in the user's capture.
 */
html[data-crossbrand89] body footer > section.brand-network {
  display: block !important;
  box-sizing: border-box !important;
  width: min(100% - clamp(32px, 7.5vw, 220px), 1700px) !important;
  max-width: 1700px !important;
  margin: 0 auto !important;
  padding: clamp(42px, 5vw, 82px) 0 clamp(34px, 4vw, 68px) !important;
}

html[data-crossbrand89] body footer > section.brand-network > .brand-network-heading {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px 24px !important;
  width: 100% !important;
  margin: 0 0 clamp(18px, 2vw, 30px) !important;
}

html[data-crossbrand89] body footer > section.brand-network > .brand-network-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: clamp(10px, .8vw, 16px) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

html[data-crossbrand89] body footer .brand-network-grid > .brand-network-card {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}

html[data-crossbrand89] body footer .brand-network-grid > .brand-network-card > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 8 / 3 !important;
  object-fit: cover !important;
}

/* The shared runtime also appends the same five destinations as a second v18
 * block after the footer. Keep the canonical in-footer network and suppress only
 * that duplicate presentation; links and destinations remain in the document. */
html[data-crossbrand89] body > .kp-brand-network-v18 {
  display: none !important;
}

@media (min-width: 1280px) {
  html[data-crossbrand89] body footer > section.brand-network > .brand-network-grid > .brand-network-card:last-child {
    grid-column: auto !important;
    width: 100% !important;
    justify-self: stretch !important;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  html[data-crossbrand89] body footer > section.brand-network > .brand-network-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-crossbrand89] body footer > section.brand-network > .brand-network-grid > .brand-network-card:last-child {
    grid-column: 1 / -1 !important;
    width: calc((100% - clamp(10px, .8vw, 16px)) / 2) !important;
    justify-self: center !important;
  }
}

@media (max-width: 767px) {
  html[data-crossbrand89] body footer > section.brand-network {
    width: min(100% - 28px, 680px) !important;
  }

  html[data-crossbrand89] body footer > section.brand-network > .brand-network-heading {
    display: grid !important;
    justify-content: stretch !important;
  }

  html[data-crossbrand89] body footer > section.brand-network > .brand-network-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}
