/* RJ_AUDIT_FIXES_START — scoped companion presentation fixes. */
@layer rj-project-pilot {
  /* The root marker is added only after the shared pilot has admitted a page. */
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #rj-edr-case-1022 {
    --rj-audit-ink: #171b1a;
    --rj-audit-orange: #e56415;
  }

  /* Retain the artwork and layout while making the reading surfaces solid orange. */
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #rj-edr-case-1022 :is(.rj-pilot-reading, .rj-pilot-index, .rj-pilot-ending) {
    background-color: #e56415 !important;
    background-image: none !important;
    color: #171b1a !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #rj-edr-case-1022 :is(.rj-pilot-reading, .rj-pilot-index, .rj-pilot-ending) {
    border-color: #171b1a66 !important;
  }

  /* Only real, visible native chapter headings are marked by the companion JS.
     The explicit section IDs keep this above the older Rugby section rule. */
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="craftmas"] :is(
    #section_1bhmw3xy0,
    #section_pqih1bu5m,
    #section_eqfkmc0c8,
    #section_j8e5vchpb
  ) h2.rj-audit-chapter-heading,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="backsa"] :is(
    #section_d8584fb31,
    #section_184ef199c
  ) h2.rj-audit-chapter-heading,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rugby"] :is(
    #section_4121d6127,
    #section_535d0a75b,
    #section_9cp6rvxse
  ) h2.rj-audit-chapter-heading,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="spring"] #section_341keqs5t h2.rj-audit-chapter-heading,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="qudos"] :is(
    #section_1phvnzqub,
    #section_ky7y9oavp
  ) h2.rj-audit-chapter-heading,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="sims"] :is(
    #section_rwy2wd0w4,
    .rj-review-sims-details
  ) h2.rj-audit-chapter-heading,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="type"] #section_b5106b936 h2.rj-audit-chapter-heading {
    box-sizing: border-box !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    font: 700 clamp(40px, 4vw, 56px)/1.05 upgrade, Arial, sans-serif !important;
    letter-spacing: -.03em !important;
  }

  /* Native Semplice wrappers often carry an inline font on a child span. */
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot] h2.rj-audit-chapter-heading span {
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit !important;
  }

  /* Shared caption rhythm, without changing media dimensions or section padding. */
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot] .rj-pilot-caption {
    margin-top: 16px !important;
    font: 400 15px/1.5 upgrade, Arial, sans-serif !important;
    letter-spacing: normal !important;
  }

  /* Everyday Rewards normal copy and controls on the retained orange. Large
     display headings and embedded artwork intentionally remain untouched. */
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #section_rjedrrestoreintro :is(
    .rj-pilot-eyebrow,
    .rj-pilot-summary,
    .rj-pilot-button,
    .rj-pilot-motion,
    .rj-edr-replay
  ),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-index > span,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-index a,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading :is(p, h3, dt, dd),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading > .rj-pilot-eyebrow,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-copy > p,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-edr-process-copy > p,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-pilot-story :is(h3, p),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-pilot-meta :is(dt, dd),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-pilot-delivered :is(h3, p),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading :is(.rj-pilot-caption, .rj-asset-caption, .rj-edr-play-note, .rj-edr-compare-help),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-edr-compare-controls button {
    color: #171b1a !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #section_rjedrrestoreintro :is(
    .rj-pilot-button,
    .rj-pilot-motion,
    .rj-edr-replay
  ),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-edr-compare-controls button {
    border-color: #171b1a !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #section_rjedrrestoreintro :is(
    .rj-pilot-eyebrow,
    .rj-pilot-summary,
    .rj-pilot-button,
    .rj-pilot-motion,
    .rj-edr-replay
  ) :is(span, strong, em),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading :is(
    p,
    h3,
    dt,
    dd,
    .rj-pilot-eyebrow,
    .rj-copy > p,
    .rj-edr-process-copy > p,
    .rj-pilot-story :is(h3, p),
    .rj-pilot-meta :is(dt, dd),
    .rj-pilot-delivered :is(h3, p),
    .rj-pilot-caption,
    .rj-asset-caption,
    .rj-edr-play-note,
    .rj-edr-compare-help,
    .rj-edr-compare-controls button
  ) :is(span, strong, em) {
    color: inherit !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-index a:focus-visible,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #section_rjedrrestoreintro :is(
    .rj-pilot-button,
    .rj-pilot-motion,
    .rj-edr-replay
  ):focus-visible,
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-edr-compare-controls :is(button, input):focus-visible {
    outline-color: #171b1a !important;
  }

  /* Keep the comparison labels and divider white on their dark/orange overlays. */
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-edr-compare :is(.rj-edr-compare-label, .rj-edr-compare-divider > span) {
    color: #fff !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-reading .rj-edr-compare-controls input {
    accent-color: #171b1a !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-ending {
    color: #171b1a !important;
    border-top-color: #171b1a66 !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-ending :is(
    .rj-pilot-eyebrow,
    .rj-pilot-button,
    .rj-pilot-top-link
  ),
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-ending nav :is(.rj-pilot-button, .rj-pilot-top-link) :is(span, strong, em) {
    color: #171b1a !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-ending .rj-pilot-button {
    border-color: #171b1a !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] .rj-pilot-ending :is(.rj-pilot-button, .rj-pilot-top-link):focus-visible {
    outline-color: #171b1a !important;
  }

  @media (max-width: 767px) {
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="craftmas"] :is(
      #section_1bhmw3xy0,
      #section_pqih1bu5m,
      #section_eqfkmc0c8,
      #section_j8e5vchpb
    ) h2.rj-audit-chapter-heading,
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="backsa"] :is(
      #section_d8584fb31,
      #section_184ef199c
    ) h2.rj-audit-chapter-heading,
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rugby"] :is(
      #section_4121d6127,
      #section_535d0a75b,
      #section_9cp6rvxse
    ) h2.rj-audit-chapter-heading,
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="spring"] #section_341keqs5t h2.rj-audit-chapter-heading,
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="qudos"] :is(
      #section_1phvnzqub,
      #section_ky7y9oavp
    ) h2.rj-audit-chapter-heading,
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="sims"] :is(
      #section_rwy2wd0w4,
      .rj-review-sims-details
    ) h2.rj-audit-chapter-heading,
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="type"] #section_b5106b936 h2.rj-audit-chapter-heading {
      font-size: 34px !important;
      line-height: 1.08 !important;
    }

    /* On mobile the shared hero copy is an orange block below the artwork. */
    #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="rewards"] #section_rjedrrestoreintro .rj-pilot-hero-copy {
      background: #e56415 !important;
      background-image: none !important;
    }
  }
}

/* IMF's poster is a runtime-owned fallback; only the inserted image is styled. */
@layer rj-project-pilot {
  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="imf"] #cover-1109 img.rj-audit-imf-poster {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }

  #content-holder [data-rj-audit-fixes="1"][data-rj-pilot="imf"] #cover-1109 img.rj-audit-imf-poster[hidden] {
    display: none !important;
  }
}
/* RJ_AUDIT_FIXES_END */
