
/* Rubik Pro v201: visually aligned with Sudoku Pro's white unified header. */
body > header:not(#rp-shared-header),
body > footer:not(#rp-shared-footer),
body footer.sp-unified-footer-v177,
body > .top,
body #rubikpro-global-navigation{display:none!important}

#rp-shared-header{
 position:relative!important;z-index:300!important;display:block!important;width:100%!important;
 margin:0!important;background:#fff!important;color:#233b58!important;
 border-bottom:1px solid #d6e3f2!important;
 box-shadow:0 2px 9px #233a5b0b!important;
 font:600 14px/1.5 system-ui,"Segoe UI",Arial,sans-serif!important;
 box-sizing:border-box!important;
}
#rp-shared-header *,#rp-shared-footer *{box-sizing:border-box!important}
#rp-shared-header .rp-shared-inner{
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:14px!important;width:min(1460px,calc(100% - 26px))!important;
 min-height:68px!important;margin:0 auto!important;padding:10px 2px!important;
 direction:ltr!important;flex-wrap:nowrap!important;
}
#rp-shared-header .rp-shared-brand{
 color:#1762b0!important;font-size:20px!important;font-weight:900!important;
 letter-spacing:-.04em!important;white-space:nowrap!important;
 text-decoration:none!important;margin:0!important;flex:0 0 auto!important;
}
#rp-shared-header .rp-shared-nav{
 display:flex!important;align-items:center!important;justify-content:center!important;
 flex-wrap:wrap!important;gap:2px!important;max-width:100%!important;
 margin:0 auto!important;direction:ltr!important;min-width:0!important;
}
#rp-shared-header[lang="ar"] .rp-shared-nav{direction:rtl!important}
#rp-shared-header .rp-shared-nav a{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 border-radius:10px!important;white-space:nowrap!important;
 padding:9px 10px!important;font:750 13px/1.3 system-ui,"Segoe UI",Arial,sans-serif!important;
 color:#415776!important;background:transparent!important;text-decoration:none!important;
 border:1px solid transparent!important;transition:background .12s,color .12s!important;
}
#rp-shared-header .rp-shared-nav a:hover,
#rp-shared-header .rp-shared-nav a[aria-current=page]{
 background:#edf5ff!important;color:#173e75!important;
}
#rp-shared-header .rp-shared-nav a.rp-cross-product{
 border:1px solid #d1e2f6!important;color:#24558f!important;background:#f5f9ff!important;
 box-shadow:none!important;font-weight:800!important;
}
#rp-shared-header .rp-shared-nav a.rp-cross-product:hover{
 background:#e6f1fd!important;color:#173e75!important;border-color:#b6d1f0!important;
}
#rp-shared-header .rp-v201-actions{display:flex!important;align-items:center!important;gap:8px!important;flex:0 0 auto!important}
#rp-shared-header .rp-v201-icon-btn{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 gap:6px!important;min-width:40px!important;height:40px!important;
 padding:7px 10px!important;color:#234a70!important;background:#fff!important;
 border:1px solid #cedce9!important;border-radius:10px!important;
 cursor:pointer!important;font:800 13px/1.3 system-ui,"Segoe UI",Arial,sans-serif!important;
 box-shadow:none!important;text-decoration:none!important;
}
#rp-shared-header .rp-v201-icon-btn:hover{
 border-color:#9fc2e8!important;background:#edf5ff!important;color:#164c81!important;
}
#rp-shared-header .rp-v201-icon-btn:focus-visible{
 outline:2px solid #4383c1!important;outline-offset:2px!important;
}
#rp-shared-header .rp-v201-share svg{display:block!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
#rp-shared-header .rp-v201-share svg circle{fill:#fff!important}
#rp-shared-header .rp-v201-language{
 min-width:77px!important;gap:7px!important;padding:7px 10px!important;
 direction:ltr!important;white-space:nowrap!important;
}
#rp-shared-header .rp-v201-language-flag{
 display:block!important;width:28px!important;height:20px!important;
 object-fit:cover!important;border-radius:3px!important;flex:0 0 28px!important;
}
#rp-shared-header .rp-v201-language-code{font-size:13px!important;font-weight:850!important;color:#183c68!important;line-height:1!important}
/* Academy topic selectors are CONTEXT filters, not a second navigation. */
#rp-academy-tabs{
 background:#f2f7fc!important;max-width:1210px!important;margin:0 auto 10px!important;
 padding:9px 13px!important;border:1px solid #d5e6f5!important;
 border-radius:0 0 14px 14px!important;box-sizing:border-box!important;
}
#rp-academy-tabs #rubikTopicNav{
 display:flex!important;position:static!important;top:auto!important;
 flex-wrap:wrap!important;gap:6px!important;width:100%!important;justify-content:center!important;
 margin:0!important;align-items:center!important;
}
#rp-academy-tabs #rubikTopicNav button{
 background:#fff!important;color:#1a5078!important;
 border:1px solid #c5d9ea!important;border-radius:9px!important;padding:8px 12px!important;
 font:700 13px/1.4 system-ui,"Segoe UI",Arial,sans-serif!important;
}
#rp-academy-tabs #rubikTopicNav button[aria-current=page]{
 background:#d7ebfc!important;border-color:#76adde!important;color:#174a76!important;
}
#rp-academy-tabs #rubikLangBtn{display:none!important}
#rp-academy-tabs .rubik-mobile-section,#rp-academy-tabs .rubik-mobile-section-label{display:none!important}

/* Footer uses Sudoku Pro's light, neutral surface and spacing. */
#rp-shared-footer{
 display:block!important;position:relative!important;z-index:2!important;
 width:100%!important;max-width:none!important;
 margin:38px 0 0!important;padding:22px 17px!important;
 background:#f9fbfe!important;color:#25476e!important;
 border-top:1px solid #d4e2ef!important;
 box-sizing:border-box!important;clear:both!important;
 font:500 13px/1.7 system-ui,"Segoe UI",Arial,sans-serif!important;
}
#rp-shared-footer .rp-footer-inner{
 max-width:1230px!important;margin:0 auto!important;display:flex!important;
 align-items:center!important;gap:16px 25px!important;flex-wrap:wrap!important;
}
#rp-shared-footer strong{font-size:17px!important;color:#1b5c9a!important;margin:0!important}
#rp-shared-footer .rp-footer-nav{display:flex!important;gap:8px 18px!important;align-items:center!important;flex-wrap:wrap!important}
#rp-shared-footer .rp-footer-nav a{color:#295b8b!important;text-decoration:none!important;font-weight:650!important;font-size:13px!important}
#rp-shared-footer .rp-footer-nav a:hover{text-decoration:underline!important}
#rp-shared-footer small{font-size:12px!important;color:#57768f!important;margin-inline-start:auto!important;flex-basis:auto!important}

/* Preserve previous non-duplicated cube lesson layout. */
body.rp-single-cube-lesson figure.learning-visual-v176{display:none!important}
body.rp-single-cube-lesson .v176-lesson-hero{display:block!important;min-height:0!important;margin-block:20px!important}
body.rp-single-cube-lesson .v176-lesson-hero-copy{width:100%!important;max-width:none!important;min-width:0!important;display:block!important}

/* Sudoku header uses a wrap on tablet, scrolling the nav on narrow phones. */
@media(max-width:1250px){
 #rp-shared-header .rp-shared-inner{flex-wrap:wrap!important;justify-content:center!important}
 #rp-shared-header .rp-shared-brand{margin-inline-end:auto!important}
 #rp-shared-header .rp-v201-actions{order:2!important}
 #rp-shared-header .rp-shared-nav{
  order:3!important;width:100%!important;max-width:100%!important;
  justify-content:center!important;flex-wrap:nowrap!important;overflow-x:auto!important;
  padding:4px 0!important;
 }
}
@media(max-width:720px){
 #rp-shared-header .rp-shared-inner{padding:9px 2px!important;gap:8px!important}
 #rp-shared-header .rp-shared-nav{justify-content:flex-start!important}
 #rp-shared-header[lang="ar"] .rp-shared-nav{justify-content:flex-start!important}
 #rp-shared-header .rp-shared-nav a{padding:8px 9px!important;font-size:12px!important}
 #rp-shared-header .rp-v201-icon-btn{height:36px!important;min-width:36px!important}
 #rp-shared-header .rp-v201-language{min-width:72px!important}
 #rp-academy-tabs #rubikTopicNav{display:none!important}
 #rp-academy-tabs .rubik-mobile-section{display:block!important;width:100%!important;background:#fff!important;color:#174665!important;min-height:42px!important}
 #rp-academy-tabs .rubik-mobile-section-label{display:block!important;margin:3px 0 5px!important;font-size:12px!important;color:#174665!important}
 #rp-shared-footer .rp-footer-inner{flex-direction:column!important;align-items:flex-start!important}
}

#rp-shared-header .rp-v201-language{min-width:82px!important}
#rp-shared-header .rp-v201-language-code{font-weight:850!important}
