/* R8 shares R7's layer so later refinements win, while R6's first hidden-state layer remains authoritative. */
@layer r7-refinement {
 body.jem33-r8 {--r8-cobalt:#235CF2;--r8-navy:#102338;--r8-ink:#102338;--r8-teal:#007F73;--r8-orange:#FF9C50;--r8-lime:#B9F33A;}
 body.jem33-r8 [data-r8-waste="defects"] {--r8-waste:#C82D49;--r8-waste-ink:#FFFFFF;--waste-category-accent:#C82D49!important;--waste:#C82D49!important;}
 body.jem33-r8 [data-r8-waste="overproduction"] {--r8-waste:#FF9C50;--r8-waste-ink:#102338;--waste-category-accent:#FF9C50!important;--waste:#FF9C50!important;}
 body.jem33-r8 [data-r8-waste="waiting"] {--r8-waste:#235CF2;--r8-waste-ink:#FFFFFF;--waste-category-accent:#235CF2!important;--waste:#235CF2!important;}
 body.jem33-r8 [data-r8-waste="talent"] {--r8-waste:#783FDA;--r8-waste-ink:#FFFFFF;--waste-category-accent:#783FDA!important;--waste:#783FDA!important;}
 body.jem33-r8 [data-r8-waste="transportation"] {--r8-waste:#21C6DF;--r8-waste-ink:#102338;--waste-category-accent:#21C6DF!important;--waste:#21C6DF!important;}
 body.jem33-r8 [data-r8-waste="inventory"] {--r8-waste:#FFC43A;--r8-waste-ink:#102338;--waste-category-accent:#FFC43A!important;--waste:#FFC43A!important;}
 body.jem33-r8 [data-r8-waste="motion"] {--r8-waste:#B9F33A;--r8-waste-ink:#102338;--waste-category-accent:#B9F33A!important;--waste:#B9F33A!important;}
 body.jem33-r8 [data-r8-waste="processing"] {--r8-waste:#BE267F;--r8-waste-ink:#FFFFFF;--waste-category-accent:#BE267F!important;--waste:#BE267F!important;}

 /* One category means one color in discovery, learning, selection, classification and saved work. */
 body.jem33-r8 :is(.wseo-cards>div,.wseo-waste-types>li,.hero-waste-observation li,.waste-mini-registry>a,.waste-card)[data-r8-waste] {background:var(--r8-waste)!important;color:var(--r8-waste-ink)!important;border-color:var(--r8-waste)!important;}
 body.jem33-r8 :is(.wseo-cards>div,.wseo-waste-types>li,.hero-waste-observation li,.waste-mini-registry>a,.waste-card)[data-r8-waste] :is(h2,h3,p,span,strong,small,svg) {color:var(--r8-waste-ink)!important;}
 body.jem33-r8 :is(.wseo-cards>div,.wseo-waste-types>li,.hero-waste-observation li,.waste-mini-registry>a,.waste-card)[data-r8-waste] svg {stroke:var(--r8-waste-ink)!important;background:transparent!important;}
 body.jem33-r8 .waste-card[data-r8-waste] :is(button,.button) {background:#102338!important;color:#FFFFFF!important;border:1px solid #FFFFFF70!important;}
 body.jem33-r8 .waste-card[data-r8-waste].is-selected {outline:4px solid #102338!important;outline-offset:3px!important;}
 body.jem33-r8 .waste-card[data-r8-waste] button[aria-pressed="true"] {background:#FFFFFF!important;color:#102338!important;border-color:#FFFFFF!important;}
 body.jem33-r8 .waste-card[data-r8-waste] :is(button,.button) :is(span,svg,strong) {color:inherit!important;stroke:currentColor!important;}
 body.jem33-r8 .question-card[data-r8-waste] {border:2px solid var(--r8-waste)!important;border-top-width:6px!important;}
 body.jem33-r8 .question-card[data-r8-waste]>legend {background:var(--r8-waste)!important;color:var(--r8-waste-ink)!important;border-radius:999px!important;padding:9px 16px!important;font-size:16px!important;font-weight:800!important;}
 body.jem33-r8 .saved-row[data-r8-waste] {border-left:6px solid var(--r8-waste)!important;}
 body.jem33-r8 .saved-row[data-r8-waste] .saved-icon {background:var(--r8-waste)!important;}
 body.jem33-r8 .saved-row[data-r8-waste] .saved-icon svg {stroke:var(--r8-waste-ink)!important;}
 body.jem33-r8 :is(.summary>div,.next-guidance)[data-r8-waste]>svg {stroke:var(--r8-waste)!important;}
 body.jem33-r8 :is(.brand-product-module[data-product-tone="waste"],.r6d-premium-pair .waste-discovery,.r5-waste .r5d-native-stage,.alignment-waste-learn) {background:#007F73!important;color:#FFFFFF!important;}
 body.jem33-r8 .alignment-waste-learn :is(h2,h3,p,a) {color:#FFFFFF!important;}
 body.jem33-r8 .brand-product-module[data-product-tone="tools"] {background:#235CF2!important;}
 body.jem33-r8 .brand-product-module[data-product-tone="waste"]>a {background:#FF9C50!important;color:#102338!important;}
 body.jem33-r8 .r6-discovery .r5d-actions .button {background:#235CF2!important;color:#FFFFFF!important;border-color:#235CF2!important;}
 body.jem33-r8 .r6-discovery .r5d-actions .button :is(span,svg) {color:#FFFFFF!important;}
 body.jem33-r8 .r6-discovery .r5d-actions .outline-button {color:#1749CC!important;border-color:#1749CC!important;}

 /* Bold heading bands carry the visual rhythm beyond the first screen. */
 body.jem33-r8 :is(.r6d-section-heading,.r6d-premium-heading) {padding:20px 24px!important;margin:28px 0 18px!important;background:#102338!important;color:#FFFFFF!important;border:0!important;border-left:6px solid #FF9C50!important;border-radius:14px!important;align-items:center!important;}
 body.jem33-r8 :is(.r6d-section-heading,.r6d-premium-heading) :is(h2,h3) {color:#FFFFFF!important;font-size:28px!important;font-weight:800!important;line-height:1.3!important;margin:0!important;}
 body.jem33-r8 :is(.r6d-section-heading,.r6d-premium-heading)>p {color:#E6EFF8!important;font-size:17px!important;line-height:1.65!important;margin:0!important;}
 body.jem33-r8 .r6d-premium-heading>span {background:#FF9C50!important;color:#102338!important;font-size:14px!important;font-weight:800!important;}
 body.jem33-r8 .ordrel-catalog-group .ordrel-group-heading {background:var(--r7-group-color,#235CF2)!important;}
 body.jem33-r8 .r8-context-note {display:block!important;margin:12px 0 24px!important;padding:18px 24px!important;background:#173D68!important;color:#FFFFFF!important;border:0!important;border-left:5px solid #FF9C50!important;border-radius:12px!important;font-size:16px!important;font-weight:650!important;line-height:1.65!important;max-width:none!important;}
 body.jem33-r8 .r8-context-note a {color:#FFBD85!important;font-weight:800!important;}
 body.jem33-r8 .mw-completion-note {display:block!important;margin:0 0 24px!important;padding:18px 24px!important;border:0!important;border-left:5px solid #FF9C50!important;border-radius:0 0 14px 14px!important;background:#235CF2!important;color:#FFFFFF!important;font-size:16px!important;font-weight:650!important;line-height:1.65!important;}
 body.jem33-r8 #weekly-review+p.fine {background:#173D68!important;color:#FFFFFF!important;font-size:16px!important;font-weight:650!important;margin:8px 0 24px!important;padding:18px 24px!important;border-left:5px solid #FF9C50!important;border-radius:12px!important;}
 body.jem33-r8 #weekly-review>summary {font-size:18px!important;font-weight:800!important;line-height:1.5!important;}
 body.jem33-r8 #weekly-review>summary>span {font-size:14px!important;background:#FF9C50!important;color:#102338!important;}

 /* Search uses the unchanged original mark and a separate white text label; canonical logo art is untouched. */
 body.jem33-r8 dialog.ox-search {background:#FFFFFF!important;}
 body.jem33-r8 dialog.ox-search .ox-search-heading {background:#0A1220!important;padding:22px 26px!important;gap:22px!important;}
 body.jem33-r8 dialog.ox-search .ox-search-heading h2 {display:flex!important;align-items:center!important;gap:26px!important;flex-wrap:wrap!important;}
 body.jem33-r8 .r8-search-word {font-size:28px!important;color:#FFFFFF!important;font-weight:800!important;}
 body.jem33-r8 .r8-search-brand {display:inline-flex!important;align-items:center!important;gap:9px!important;color:#FFFFFF!important;}
 body.jem33-r8 .r8-search-brand>img {width:44px!important;height:44px!important;object-fit:contain!important;background:transparent!important;filter:none!important;padding:0!important;margin:0!important;}
 body.jem33-r8 .r8-search-brand>span {font-size:29px!important;letter-spacing:-.045em!important;font-weight:800!important;color:#FFFFFF!important;}
 body.jem33-r8 dialog.ox-search [data-search-item] .identity-icon {color:#235CF2!important;}
 body.jem33-r8 dialog.ox-search #search-results>[data-search-item]:is(:hover,:focus-visible) {background:#102338!important;color:#FFFFFF!important;outline-color:#FF9C50!important;}
 body.jem33-r8 dialog.ox-search #search-results>[data-search-item]:is(:hover,:focus-visible) :is(.identity-name,small) {color:#FFFFFF!important;}
 body.jem33-r8 dialog.ox-search #search-results>[data-search-item]:is(:hover,:focus-visible) .identity-icon {color:#FF9C50!important;}

 @media(max-width:650px){
  /* Native Waste header flex styles must not put the separate motto beside the logo row. */
  body.jem33-r8 #r6-site-header .r6-header-top{display:block!important;}
  body.jem33-r8 :is(.r6d-section-heading,.r6d-premium-heading){padding:18px!important;gap:14px!important;}
  body.jem33-r8 :is(.r6d-section-heading,.r6d-premium-heading) :is(h2,h3){font-size:24px!important;}
  body.jem33-r8 .r8-context-note,body.jem33-r8 #weekly-review+p.fine{padding:17px 18px!important;}
  body.jem33-r8 dialog.ox-search .ox-search-heading{padding:18px!important;gap:12px!important;}
  body.jem33-r8 dialog.ox-search .ox-search-heading h2{gap:12px!important;}
  body.jem33-r8 .r8-search-word{font-size:22px!important;}
  body.jem33-r8 .r8-search-brand>img{width:33px!important;height:33px!important;}
  body.jem33-r8 .r8-search-brand>span{font-size:23px!important;}
 }
}
